View Full Version : Problem executing batch file

07-26-2005, 11:05 AM
I am trying to write the following line out to a batch file and run it.
schtasks /create /tn "UPDATE" /tr "\"c:\program files\update\update.exe\" /b2" /sc "DAILY" /st 03:00:00 /ru "SYSTEM"

But when the file is created is turns out like like the following.
schtasks /create /tn UPDATE /tr "c:\Program Files\update\update.exe " /b2 /sc DAILY /st 10:00:00 /ru SYSTEM

Here is the code used to create the file
WriteLine(nvFileHandle,"schtasks /create /tn UPDATE /tr \"" +TARGETDIR+"\\update.exe\" /b2 /sc DAILY /st "+szTimeString +":00 /ru SYSTEM");

How can I get it to look like the needed results.

07-26-2005, 03:12 PM
Could you highlight the differences you want changed? As you know, in your InstallScript string you use \\ every place you want a literal backslash \ to appear, and \" every place you want a double-quote character...