Hi, I am a newbie to VB Scripting. I am trying to call "chkdsk c: /f /r" within VB Script. It hangs since, the chkdsk asks another confirmation of "Y/N" for this command. How can i pass this Y or N with in the script??
Now if the chkdsk command 2 input, once it asks whether to dismount the volume and then it asks if to schedule on restart! In this case, how can i pass 2 parameters to the chkdsk command? Is it possible using Pipe operator??
I tried cmd /c echo Y | echo N | chkdsk d: /r, but this doesnt work!
WScript.Sleep 2000 WshShell.SendKeys "N" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}"
That might work but there again its a very crude way of doing it but if it works for the time being I am sure it would be useful unless someone else has a diffrent approach which is much better go with that :)
Here's a portion of a script that I used once... it lets me schedule a chkdsk for next reboot, and then clear that setting right after it boots into Windows again. I've added comments for a "walkthru"
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
"It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury