|
Answer» I have a batch file containing 3 lines. If I run these commands individually from the command prompt they work fine. When I try to run it in the batch file the command window just shows the first line over and over....and doesn't even executed the command.
Any ideas?
commands in batch file:
schtasks /CREATE /ru cafcashier01 /RP cashier /SC weekly /d SUN /TN defrag /TR """"c:\documents and settings\all users\desktop\horizon\autodefrag.exe"""" /ST 04:00:00
schtasks /create /ru cafcashier01 /rp cashier /SC weekly /d SAT /TN reboot /TR """"c:\documents and settings\all users\desktop\horizon\reboot.vbs"""" /ST 04:00:00
schtasks /create /ru cafcashier01 /rp cashier /SC daily /TN deletelogs /TR """"c:\documents and settings\all users\desktop\horizon\deleteold.vbs"""" /ST 22:00:00Your batch file is called schtasks.bat ? Then change the file name.I've tried that.
It turns out the PROBLEM has SOMETHING to do w/ notepad. If I create and edit this file only in MS-DOS text editor, it works fine.
If I save it in notepad it starts doing this?!What do you save it as in notepad? Select save as all files and type .bat at the end.
|