07-14-2011, 05:45 AM
Quote:When scheduling a task that executes a file where the path or file name has spaces you need to use escaped double quotes ( \" ) around the <path>\<filename> and regular double quotes around the entire command itself. So to open c:\test.doc using MS Word structure your command as follows:Found here: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
schtasks /create /tn "My App Job1" /tr "\"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE\" C:\text.doc"
/sc DAILY /st 05:00:00 /ru <username> /rp
<password>
Function ScheduleOnce
