J
Jonathan Miller
Guest
I need to use the schtasks.exe to create a new scheduled task. One of the
parameters allows you to specify the filename. The file I want to run is in
the Program Files folder. I specify the path, the task gets created but will
not run! The only way to fix it is to open the properties of the task in the
GUI and add double quotes around the whole path! Is there an escape sequence
or something I can use in the command line so that the quotes stay on the
file name?
Here is what I'm doing:
schtasks /create /SC DAILY /ST 02:30:00 /TN test /TR "C:\Program
Files\Test\Test.exe" /RU SYSTEM
As you can see I have double quotes around the path so that the commandline
recognizes it as one parameter. However, when the task is created the double
quotes are stripped off the filename stored with the task. Then when I try
to run the task it won't run because it needed those double quotes. Any
suggestions would be appreciated here.
parameters allows you to specify the filename. The file I want to run is in
the Program Files folder. I specify the path, the task gets created but will
not run! The only way to fix it is to open the properties of the task in the
GUI and add double quotes around the whole path! Is there an escape sequence
or something I can use in the command line so that the quotes stay on the
file name?
Here is what I'm doing:
schtasks /create /SC DAILY /ST 02:30:00 /TN test /TR "C:\Program
Files\Test\Test.exe" /RU SYSTEM
As you can see I have double quotes around the path so that the commandline
recognizes it as one parameter. However, when the task is created the double
quotes are stripped off the filename stored with the task. Then when I try
to run the task it won't run because it needed those double quotes. Any
suggestions would be appreciated here.