I have a batch file that I used to install my C # Windows Services for a while, there was never a problem before Windows 7. I tried to run the batch file as administrator. I tried to run the command line using admin privs, go to the Windows EXE service and run InstallUtil there. Still not working.
After reading some other suggestions, I tried moving my files from the / bin folder and running them from another location, but that also did not work.
The batch file is as follows:
@ECHO OFF REM The following directory is for .NET 2.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v2.0.50727 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------------------------------------- InstallUtil /i IEPPAMS_WinService1.exe echo --------------------------------------------------- echo Done.
and I have an installation log file to which I send information. If I just double-click the .bat file, I get
Starting a transactional installation.
Beginning of the installation phase installation. See the contents of the log file for C: \ Users \ Justin \ Desktop \ Service Test \ IEPPAMS_WinService1.exe build progress. The file is located in C: \ Users \ Justin \ Desktop \ Service Test \ IEPPAMS_WinService1.InstallLog.
An exception occurred during the installation phase. System.InvalidOperationException: Cannot open Computer Service Control Manager. This operation may require other privileges. An internal exception System.ComponentModel.Win32Exception was thrown with the following error message: Access denied.
The rollback of the installation phase begins. See the contents of the log file for C: \ Users \ Justin \ Desktop \ Service Test \ IEPPAMS_WinService1.exe build progress. The file is located in C: \ Users \ Justin \ Desktop \ Service Test \ IEPPAMS_WinService1.InstallLog.
Rollback completed successfully.
Completed transaction completed.
When I run the .bat file as administrator, nothing is written to the log file and the service is still not installed.
Any thoughts? Is there a new way to install services in Windows 7?
Justin c
source share