Question

Yesterday I was playing with the WindowsService project option on Visual Studio and when trying to install my service I was facing errors, after a few tries it finally occurred to me that I would probably need admin rights to install a service. And it did install when I switched to "Run as Administrator". But what it got me thinking, is that, how are other programs, like PunkBuster, AMD Drivers, Adobe Acrobat Update Service, Filezilla Server FTP... and so on, capable of installing a service by simply running an executable and not showing any kind of window to request admin rights? I mean, if I really wanted to, how would I go about doing the same with an application created by me?

No correct solution

OTHER TIPS

This is not the answer you want to hear, nonetheless it is the answer: That's not possible. You do need admin rights to install Windows services, and there is no way around this.

The other programs you mentioned most likely got the admin rights already (like requested it when started) or asked the user for these rights at runtime.

you can make a install package, for example, use installshield, this tool can do something for you: register COM objects, install/uninstall services.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top