End Google Ads 201810 - BS.net 01 --> I used below code to start service.
var sc = new System.ServiceProcess.ServiceController("ELSRegressionService");if (sc.Status.ToString().Equals("Stopped")) sc.Start();
Its working fine, when logged in with Administrator credentials. If I login with other user credentials, it throws exception, "Cannot open Servicexxx service on computer 'COMPUTER_NAME'"
I would like to ask for credentials before the user tries to start service. So please guide me to check for credentials to start windows service programmatically. Thanks in advance
مواقع النشر (المفضلة)