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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -