Commands not working from bat file

  • Thread starter Thread starter Bob Day
  • Start date Start date
B

Bob Day

In windows XP Pro, I have 4 Control Panel, Scheduled Tasks. The task itself
runs a .bat file, with that .bat executing the task. The issue is not with
Scheduled Tasks, but with why certain commands don't work form a .bat file.

chkdsk works fine from the .bat file (whether run from Scheduled Tasks or
run manually).
Shutdown and Defrag, however, do nothing when executed from the bat file,
even if the bat file is run manually from a command prompt. It I manually
type in the command line in the bat file for the same folder, both run fine.

The actual command line for each .bat file is:
defrag C: -v
shutdown -r -f -t 30 -c "Scheduled Reboot Final Before Solution Runs"

Why do these not work from a .bat file?

Bob Day
 
Back
Top