I am trying to install a windows service on my local windows 7 dev box for testing. However, installation fails with the error below !!!!!!!

Error : An exception occurred 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.

How do i resolve this? My user account is having the administrator privileges

Fix :

What i did is to run the Visual Studio Command Prompt as administrator(which invokes the Command Prompt with administrator privileges.) and now you can continue with the windows service installation without any issues 🙂