Microsoft
Software
Hardware
Network
Question : Have a problem with schtasks command in a tiny batch file
Hello, This looks like a simple case of where to add the speech marks to a one line batch file but it is driving me nuts.
We want to schedule a task to run a file every week and i need to do this on multiple machines. I was going to add a .bat file which simply says
schtasks /create /tn runrecon /tr "C:\Program Files\JAMF Software\WPP\submitInvento
ry.vbs" /ru "System" /sc WEEKLY /mo 1 /d TUE /st 13:30:00
It says it completes successfully but when i check task scheduler I find that the task is there to run at the right times and under the right user but the action it is going to take says start a program and the details say C:\Program Files\JAMF Software\WPP\submitInvento
ry.vbs
ok so far...
double clicking that says that the program is C:\Program
and the argument is Files\JAMF Software\WPP\submitInvento
ry.vbs
this looks wrong and as if it is something to do with the space in program files.
If i copy all the argument txt and paste it in to the program area i get this message..
it appears as though arguments have been included in the program text box. Do you want to run the following program:
C:\program
with the following arguments: Files\JAMF Software\WPP\submitInvento
ry.vbs
can anyone help so that the space in program files doesnt confuse task scheduler?
Answer : Have a problem with schtasks command in a tiny batch file
Give this a try:
schtasks /create /tn runrecon /tr "CSCRIPT \"C:\Program Files\JAMF Software\WPP\submitInvento
ry.vbs\"" /ru "System" /sc WEEKLY /mo 1 /d TUE /st 13:30:00
~bp
Random Solutions
Can I capture mic data?
canĀ“t install forefront update KB 978297 on windows 2008 SBS
Forefront TMG Malware and NIS inspection updates aren't working.
Opening an Access form with allowadditions property set to false and no records found
ORA-12704: character set mismatch
How can I sync up two web servers using Windows Server 2008 or thus Windows Server 2008 has this function?
add drivers to sysprepped windows 7 for different computers and hw
Grab last two lab results
How do I resolve this error "javax.xml.ws.WebServiceEx
ception .... Place the resource correctly in the classpath.?
IE is blocking my download of Adobe Flash, I'm getting install error.