PDA

View Full Version : Is there a way to detect is Windows Task Scheduler is running?



dewhead
08-03-2009, 08:37 AM
For my project I'm adding a scheduled task so that it will check once a day if there's a new version and update itself if there is.

My problem is that I have found that many system admins have disabled the Task Scheduler service. Does SetupBuilder have a method that can detect if the Task Scheduler service is running? I'd like to raise a dialog box during the install advising the user to restart the Task Scheduler.

The reason I'm wanting to do this is because my software runs as a Windows service. It wakes up every hour and does it's thing and then goes back to sleep. If I fire off the web update from inside the service then the web update runs and tries to uninstall the service. Well, when it stops the service it also stops running the web update because web update was called from within the service. It's a nice little Catch-22. Is there a better way I could do this?

If anyone has any advice please let me know! Also, FYI, my project is written in .NET

Thanks,
Linney Dew

linder
08-04-2009, 02:22 AM
Linney,

See attached demo project and source code snippet screenshot.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner