开发者

Failing to install the latest version of Windows Service

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.开发者_StackOverflow社区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


There is no need for custom actions to install the service. Windows Installer has built in support.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa371634(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa371637(v=VS.85).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜