Click to See Complete Forum and Search --> : This is for you DOS guru's (if there are any)
softweng
June 28th, 2001, 11:18 AM
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
Kdev
June 28th, 2001, 11:55 AM
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
softweng
June 28th, 2001, 12:03 PM
This is under windows 2000. Here is the command line (or part of it)
chkdsk c: /f /r
Kris
Software Engineer
Phoenix,AZ
dfwade
June 28th, 2001, 01:33 PM
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
softweng
June 28th, 2001, 01:36 PM
Thanks I will give it a try
Kris
Software Engineer
Phoenix,AZ
softweng
June 28th, 2001, 06:45 PM
Worked Like A Charm!!! Thanks!
Kris
Software Engineer
Phoenix,AZ
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.