[英]Upgrade (unisntall/install) Windows Service using InstallShield Setup Project
My question, is there a way to configure the InstallShield setup and deployment project so that when I attempt to install the service it will uninstall the previously installed version of the service. 我的问题是,有没有一种方法可以配置InstallShield安装和部署项目,以便在我尝试安装服务时将其卸载以前安装的服务版本。
I've created a Windows Service and an InstallShield setup and deployment project to be able to install it onto my machine. 我已经创建了Windows服务以及InstallShield设置和部署项目,可以将其安装到我的计算机上。 The process of installing and uninstalling the service all works fine.
安装和卸载服务的过程都正常。 When I go to update the service, at the moment, I need to stop the service, uninstall the service manually, and then run the installer.
当我去更新服务时,此刻,我需要停止服务,手动卸载服务,然后运行安装程序。 What I am trying to get to is a point where I can run the installer and it will uninstall the previous version of the service before installing the current version.
我想要达到的目的是可以运行安装程序,它将在安装当前版本之前先卸载该服务的先前版本。
I have seen this process of running the install and having the previous versions uninstalled work. 我已经看到了运行安装和卸载先前版本的过程。 Through creating a test project using a windows form application.
通过使用Windows窗体应用程序创建测试项目。 I was able to install the application.
我能够安装该应用程序。 Then I: incremented the product version, created a new product code, added a new upgrade entry in the upgrade path area, and configured that upgrade entry setting the min and max version.
然后,我:增加产品版本,创建新的产品代码,在升级路径区域中添加新的升级条目,并配置该升级条目以设置最低和最高版本。 After doing this, I rebuilt the setup project and ran the installer and the upgrade from version A to version B was complete.
完成此操作后,我重建了安装项目并运行了安装程序,从A版到B版的升级已完成。
The only difference I believe from the original test project (where I saw the process work) and my Windows Service project is that my test project was a Windows Forms application versus a Windows Service. 我认为与原始测试项目(在其中看到了流程的工作)和Windows Service项目的唯一区别是,我的测试项目是Windows Forms应用程序与Windows Service。 In all the research I have been doing I have seen people ask similar questions, but I have not seen any real suggestions on what actions to take.
在我进行的所有研究中,我都看到人们提出类似的问题,但是我没有看到有关采取何种行动的任何实际建议。 So if anyone knows if this is possible or has any suggestions that I could try to accomplish this task they would be greatly appreciated.
因此,如果有人知道这是否可行或有任何建议可以尝试完成此任务,他们将不胜感激。
I was able to resolve this issue, so it is possible. 我能够解决此问题,所以有可能。 The setting I mentioned above are the correct settings needed to allow the service to update.
我上面提到的设置是允许服务更新所需的正确设置。 This was just a case of human error that was causing my problems.
这只是人为错误导致我出现问题的情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.