daveky
asked on
Windowless process?
I have a process I want to run every few minutes. Windows Task Scheduler is the obvious trigger. I have written a c# console application which does the work but of course it pops up a window! Is there any way to have a c# exe run by the WTS without it needing/creating a console window?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)
if i where you just test to be sure, i know for fact that my scheduled tasks will run even if i'm not logged in on the server [windows 2003]
if i where you just test to be sure, i know for fact that my scheduled tasks will run even if i'm not logged in on the server [windows 2003]
ASKER
This is making sense. I was testing the task/exe by running it locally under may account while I was logged on. When you create the task you specify which account to run under and there is a check box to specify whether to run "Only if logged on". When you uncheck this the Specify Password button is available.
Unfortunately the status of the task never gets past "Could not start" when I set up a specific user to run the task. There is nothing in the machine logs to suggest why. Any ideas?
Unfortunately the status of the task never gets past "Could not start" when I set up a specific user to run the task. There is nothing in the machine logs to suggest why. Any ideas?
ASKER
I found the task sheduler log (c:/windows/schedlgu.log). It has this:
"abc.job" (abc.exe) 25/05/2006 12:20:24 ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
So I guess the account does not have permissions to run the exe. Which is weird.
"abc.job" (abc.exe) 25/05/2006 12:20:24 ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
So I guess the account does not have permissions to run the exe. Which is weird.
i've only used this with a local admin account not a simple user
ASKER
It's runs OK if I give the account Administrator access (which isn't ideal), but hey-ho. Cheers, for pointing me in the right direction.
glad it works out, i'm not deeply into the security implications of running jobs on the scheduler it probably just needs stronger credentials running silent then a normal user would have
thanks for the grade
thanks for the grade
ASKER
(ahahaha: if a tree falls down and there is no one there does it make any sound? We've created anew philosophical question here: If a window pops up and there is no one logged on to see it, does it pop up at all?)