how to add scheduled task, or is it possible?
what if i wanted myapp.exe to be launched every monday at 09:00 ?
22 posts
Yes! It creates the familiar job files in %WINDIR%\Tasks.Originally Posted by nsnb View Postdoes it use the Task Scheduler API?
Yes. If the password for the account is empty, then the task would not start and logs the following error:Originally Posted by nsnb View PostIf so, does it have the same limitation as XP's command line schtasks?
The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task.The behavior of the existing "NSIS Scheduled Tasks" in my test system (XP SP2) is frustratingly unexplainable: The above error would occur if the scheduled job is produced by the script, but if the same exact task is opened via GUI and interactively uncheck-then-check the box "Run only if logged on", then the task would start.
The specific error is:
0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated.
This problem is driving me crazy. I've combed the web and found many many posts describing a situation similar to what I described. For example:Originally Posted by nsnb View PostAny explanation for that? How do I even begin to troubleshoot a problem like this (aside from looking at the log file and reading what I quoted above)?
What??? This doesn't make sense. If Microsoft wanted to prohibit an Admin account with an empty password, it would have been disabled across the board, not only for the Task Scheduler.Originally Posted by ronca View PostThis is a secretly undocumented feature by Microsoft. You can't schedule tasks on a Windows account with administrator privileges that has no password.
Of course it doesn't make sense but that's Microsoft. You don't have to believe me. I don't know if you discovered this already but in task scheduler you can't enter a path with spaces in it. For example if you have something in "C:\Program Files" you must use C:\Progra~1 instead. Makes sense? Of course not but that's Microsoft.Originally Posted by nsnb View PostWhat??? This doesn't make sense.
It turns out you were correct.Originally Posted by ronca View PostI don't know if you discovered this already but in task scheduler you can't enter a path with spaces in it. For example if you have something in "C:\Program Files" you must use C:\Progra~1 instead. Makes sense? Of course not but that's Microsoft