I am trying to Install a windows service I made with the following command :
C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug>InstallU til.exe filechecker.exe
but I am getting the following message:
Running a transacted installation.
Beginning the Install phase of the installation. See the contents of the log file for the C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.exe assembly's progress. The file is located at C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.InstallLog.
An exception occurred during the Install phase. System.ArgumentException: Must specify value for source.
The Rollback phase of the installation is beginning. See the contents of the log file for the C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.exe assembly's progress. The file is located at C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
Running a transacted installation.
Beginning the Install phase of the installation. See the contents of the log file for the C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.exe assembly's progress. The file is located at C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.InstallLog.
An exception occurred during the Install phase. System.ArgumentException: Must specify value for source.
The Rollback phase of the installation is beginning. See the contents of the log file for the C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.exe assembly's progress. The file is located at C:\$(MyFiles)\Projects\Win Service\c#\filechecker\filechecker\bin\Debug\filechecker.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
How can I solve this issue?
In Solution Explorer, access Design view for the service for which you want to add an installation component. Click the background of the designer to select the service itself, rather than any of its contents. With the designer in focus, right-click, and then click Add Installer.
The InstallUtil binary may also be digitally signed by Microsoft and located in the . NET directories on a Windows system: C:\Windows\Microsoft.NET\Framework\v \InstallUtil.exe and C:\Windows\Microsoft.NET\Framework64\v \InstallUtil.exe .
A ServiceInstaller
always1 creates an event log source, and sets the Source
name to the ServiceName
. The error suggests to me that you're not setting the ServiceName
on your ServiceInstaller
instance (although I'd have hoped for a better error).
1Unless you manually iterate its installers collection and remove it, after it's instantiated. You'd also have to make sure you turn off all of the automatic logging and/or manually add your own EventLogInstaller
using the same source name - this can be useful if you wish all logging from the service (including automatic logging) to go to somewhere other than the Application event log.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With