OK! The SERVICEMODE() udf is a much better way to control the services then my example
Had this wondering around for some time, it works great though.

Doing a $mode=SERVICEMODE('Themes','Automatic') should set the start-up mode to automatic. It does for me.
First doing a check like in the example I posted above and then set the state using SERVICEMODE() udf should work.
Off course you should start the service after it has been set to automatic. It does not start by itself. And you will need the proper privileges to change service start-up mode.


Edited by R2D2 (2005-04-25 10:31 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.