Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

I am trying to install Windows Service on my system but it's returning an error

C#
C:\TMS>InstallUtil Services.exe -i
Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the C:\TMS\Services.exe assembly's
 progress.
The file is located at C:\TMS\Services.InstallLog.
Installing assembly 'C:\TMS\Services.exe'.
Affected parameters are:
   logtoconsole =
   logfile = C:\TMS\Services.InstallLog
   assemblypath = C:\TMS\Services.exe
Installing service ScheduleService...
Creating EventLog source ScheduleService in log Application...

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

The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\TMS\Services.exe assembly's
 progress.
The file is located at C:\TMS\Services.InstallLog.
Rolling back assembly 'C:\TMS\Services.exe'.
Affected parameters are:
   logtoconsole =
   logfile = C:\TMS\Services.InstallLog
   assemblypath = C:\TMS\Services.exe
Restoring event log to previous state for source ScheduleService.

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.


where I went wrong?

thanks.
Posted

This is not a code question but more of a technical question so you may try other forums. However, the error is pretty clear, it reads, "Cannot open Service Control Manager on compute
r '.'. This operation might require other privileges." You have a permissions issue.
 
Share this answer
 
This Problem is due to Security, Better open Developer Command prompt for VS 2012 in RUN AS ADMINISTRATOR and install your Service, it fix your problem surely.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900