I'm using the ServiceController
class to start a (custom) installed service, like this:
var newServiceController = new ServiceController("theNameOfMyService");
newServiceController.Start();
Trouble is, the service always runs under the local system account, and instead I want it to run under my account.
Can anyone tell me how to use ServiceController
to run a service under a different account?