I am installing a Windows Service on my Desktop with a particular version. Then I revise my service and make some changes in the service.I upgrade my installer version.I make the property RemovePreviousVersion true and I do the following things below.In Custom Action I add NOT PREVIOUSVERSIONSINSTALLED and then I add below mentioned code.
System.ServiceProcess.ServiceController serviceController = new System.ServiceProcess.ServiceController("WinDbSync1");
if (serviceController.Status != System.ServiceProcess.ServiceControllerStatus.Running)
{
serviceController.Start();
}
I have got tha above solution from link Installing Higher Versions of existing Windows Service in VS 2008 following above steps ,It installs the windows Service but doesnot execute the business functionality written in Install event.Please let me know if I am missing any step.Also I am not changing the version of exe.I am simply changing version of Installer.
Regards,
Sachin K