views:

917

answers:

1

I have noticed some applications (like steam) are able to start/stop services as a normal user with out invoking the uac control. Does any one know how to do it?

OS: Vista/Win 7 Visual Studio 2005 C++

.

Edit: I was playing around with the steam service last night trying to work out how it is different. If i put my service exe where the steam one is it launched it fine with out uac (using sc.exe) but if i used the steam exe where mine is it didnt work. Looking around in the registry at the service information i found the steam one had an extra permissions part to it. What does this mean and how do you set it?

.

Edit 2: You need to change the user access rights of the service: http://msdn.microsoft.com/en-us/library/ms684215(VS.85).aspx

+3  A: 

The ability to start (or stop) a service is controlled by the ACL on the service. If you grant interactive users the right to start your service, they can start your service.

It's all in how you set your service up when you installed it.

Obviously you'll have to use the Windows service APIs (OpenSCManager/OpenService/StartService) to start the service.

Larry Osterman
Thanks, will look into this.
Lodle
Tried it last night and it Doesnt Work :(
Lodle
What's the ACL on your service then? sc sdshow <your service name>
Larry Osterman
Thanks for the help, the info you gave lead me to this: http://msdn.microsoft.com/en-us/library/ms684215(VS.85).aspx
Lodle