Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing windows service error: cannot open service control manager on computer. this operation might require other privileges

i have windows 8 i have a windows application wrtitten with c# and on visual studio 2013 and want to install this application.

i open command prompt write:

c:\..\instalutil.exe c:\projectfolder\filename.exe

after i run this code it give me the error :

An exception occured during the Install phase.
System.InvalidOperationException: Cannot open Service Control Manager on computer '.'. This operation might require other privileges.
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: Access is denied.

This is my computer i dont know why it needs access right? and i dont know how to give right privilege.

also i changed my sercviceProcessInstaller Account property to LocalSystem and also tried with LocalService but both of them gives me the same error.

what should i do to give right privilege?

like image 643
ercan Avatar asked Jul 09 '14 09:07

ercan


People also ask

Why Cannot open Service Control Manager on computer?

"Cannot open Service Control Manager on computer ''. This operation might require other privileges." You can check the access rights settings by using the windows SC command line utility. Or you can try the mmc snapin to remotely start/stop the services on the target machine.

How do I start Windows Service Control Manager?

You can typically access the Service Control Manager by selecting Settings > Control Panel from the Windows Start menu and then double-clicking the Services program icon in the Control Panel program group (in the Main program group).


1 Answers

I found the answer finally:

The solution: RUN COMMAND PROMPT AS ADMINISTRATOR

like image 187
ercan Avatar answered Sep 22 '22 14:09

ercan