I have a windows service. Now I want to unistall it and re-install it but I have this error if I try to install it with this command:
InstallUtil.exe GestoreService.exe
The error is
It and exception occurred During Installation . System.ArgumentException : Origin GestoreService already existing in the local computer
How can I fixed this error?
This is the main code:
public GestoreService()
{
InitializeComponent();
try
{
if (!System.Diagnostics.EventLog.SourceExists("LoggerGestore"))
{
System.Diagnostics.EventLog.CreateEventSource(
"LoggerGestore", "LoggerGestore");
}
}
catch (Exception e)
{
log.Error(e);
}
log.Info("preparazione file di config in corso...");
}