This is for you DOS guru's (if there are any)
I have a .bat file that runs chkdsk and then reboots the pc. this is pushed out at night
on SMS. My problem is that chkdsk requires the user to enter y or n. I need this to be completly automatic. Any Ideas?
Thanks in advance!!!
Kris
Software Engineer
Phoenix,AZ
Re: This is for you DOS guru's (if there are any)
What version is this running under?
I have never seen chkdsk prompt the user for a y or n. Are you running any switches with chkdsk (/f perhaps)?
-K
Re: This is for you DOS guru's (if there are any)
This is under windows 2000. Here is the command line (or part of it)
chkdsk c: /f /r
Kris
Software Engineer
Phoenix,AZ
Re: This is for you DOS guru's (if there are any)
you will want to take advantage of file piping.
Create a file that contains the Y answer like this
copy con Y.txt
y
(press ctl Z) to write the file
When you run chkdsk run it like this chkdsk <Y.txt
Re: This is for you DOS guru's (if there are any)
Thanks I will give it a try
Kris
Software Engineer
Phoenix,AZ
Re: This is for you DOS guru's (if there are any)
Worked Like A Charm!!! Thanks!
Kris
Software Engineer
Phoenix,AZ