Wednesday, April 22, 2015

Run Windows service by installutil and facing permission issue c#

You seem to be confusing running the service with installing the service. When installing a service you need to have administrator rights so installutil can do its job.

Adding that manifest to the service doesn't solve anything since it's installutil who needs admin rights in the first place. Nor it would help the service in any way as it's running with admin privileges anyway.

Normally services are installed by some kind of installer which already runs as administrator. For development purposes, when you just need to install the service for testing just use "run as administrator" like you already did.

No comments:

Post a Comment