c# - How to Start Windows Service As Administrator Privileges -
i have own application server windows service communicates sql server, in cases sql server service stop stating via code
servicecontroller sc = new servicecontroller("mssql$sqlexpress"); sc.start(); sc.waitforstatus(servicecontrollerstatus.running);
but requires administrator privileges start service how can start window service administrator
i add tag in app.manifest file <requestedexecutionlevel level="requireadministrator" uiaccess="false" />
works ...
Comments
Post a Comment