I have a C#.net app I need to run off a computer. It has to be scheduled. I am using Windows XP Professional and the app is in C#.net. I have attempted to schedule the job, but I think my syntax is wrong. I would appreciate any help in getting it corrected. The c# exe file is on the c drive of the computer, and in order for it to work properly, I need to pass in a variable of “autorun”. Otherwise it will pull up a menu, and I don’t want that.
My Run code in the scheduler is:
C:\\Windows\System32\cscript.exe C:\Program Files\Paper\Paper.exe /autorun
It does something, but the exe creates an excel file that is never created, so it isn’t running properly. If I run the exe manually it works fine, so it seems like my problem is in the way I scheduled the task. Any help would be appreciated.
CScript.exe is the Console Windows Scripting Host interpreter. You need to pass scripts files to it like VBS or JS files.
It is probably failing silently in the background with a message saying it can’t understand the script file because what you are supplying cscript is an exe.
Do not bother with cscript as unless something is missing in the question, you most likely do not need this and is the reason to your problems.
Just setting “C:\Program Files\Paper\Paper.exe” /autorun in the Task Scheduler should work.