配置 InstallShield LE 以删除使用 Visual Studio 安装项目构建的早期版本
使用 Visual Studio 2010,我想切换到使用 InstallShield LE 而不是 Visual Studio 安装项目。
在安装项目中,存在一个选项RemovePreviousVersions
,这对于制作一个在新版本发布时本质上进行就地升级的安装程序非常有用。
现在使用InstallShield LE,我已经更新了版本并生成了新的ProductCode,但运行安装程序后,以前的版本仍然存在。
我需要做什么才能让 InstallShield 构建的项目可以删除使用 VS 安装项目构建的先前版本?
Using Visual Studio 2010, I would like to switch over to using InstallShield LE instead of the Visual Studio Setup Project.
In the Setup Project, an option RemovePreviousVersions
existed which was great for making an installer that would essentially do an in-place upgrade when a new version is released.
Now with InstallShield LE, I've updated the version and generated a new ProductCode, but after running the installer, the previous version is still present.
What do I need to do so that the InstallShield-built project can remove the previous version which was built with the VS Setup Project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
当我第一次在 Visual 2012 中开始一个项目时,这让我抓狂。我在添加/删除程序中不断收到重复的副本,并且旧版本没有更新。这就是我发现我需要做的事情。
在升级路径下,创建一个新路径。将最低版本留空(除非您需要),包括最低版本是的,最高版本应设置为您现在安装的版本。将最大版本包含为 yes。
每次安装更新时,请在“一般信息”部分中提高产品版本。
单击“一般信息”部分中的新产品代码
不要更改升级代码
返回升级路径,并将 Max 版本设置为您现在部署的相同版本。这是让这个对我有用的关键。
此过程会卸载以前的版本,然后安装最新版本。添加/删除程序中没有重复项。
希望这有帮助。
This drove me crazy when I first started with a project in Visual 2012. I kept getting duplicate copies in the add/remove programs, and the old version wasn't updated. Here's what I found I needed to do.
Under The Upgrade Paths, create a new path. Leave the min version blank (unless you need it), include min version yes, Max version should be set to the version YOU ARE INSTALLING NOW. Include max version to yes.
Each time you are installing an update, advance the Product version in the General Information section.
Click on a new Product Code in the General Information Section
DO NOT CHANGE the upgrade code
Go back to the upgrade path, and set the Max version to the same version you are deploying now. This was key to getting this working for me.
This process uninstalls previous version, and installs the latest. No duplicates in add/remove programs.
Hope this helps.
您可以尝试以下操作:
您还应该确保两个版本的 ALLUSERS 属性具有相同的值(这是相同的方法)。您可以在此处阅读有关升级的更多信息:http://msdn。 microsoft.com/en-us/library/aa369786(VS.85).aspx
You can try this:
You should also make sure that ALLUSERS property has the same value for both versions (it's the same approach). You can read more about upgrades here: http://msdn.microsoft.com/en-us/library/aa369786(VS.85).aspx
user2321103的答案非常好,在升级路径中创建新的升级条目是关键。不幸的是,这个选项被隐藏了,因为它是产生大多数人自然期望的安装程序的正常默认行为所必需的。
这个新答案的原因是我发现我可以将升级条目中的最大版本设置为更高的数字而不是当前版本。这意味着我不必记住为每个新版本更新此内容。我当前的版本是 2.1.8,所以我将最大版本设置为 2.1.9999。万一我可能希望在未来的某个版本中出现不同的行为,我可以将版本升级到 2.2.x
每当您更改版本号时,Microsoft 安装项目都会自动更新产品代码,但 Installshield LE 不会,因此需要记住每次都这样做。
正如其他答案所述,升级条目使用以前安装的版本中的升级代码非常重要。我还没有尝试过这一点,但想必如果由于某种原因您有多个具有不同升级代码的先前版本,那么您可以为每个版本创建一个单独的升级条目。
我不明白为什么不能将“包括最小版本”和“包括最大版本”都设置为“否”,但这似乎不起作用。我没有尝试过这些不同参数的每种组合,但正如其他答案中所述,以下设置似乎可以解决问题:
它也似乎重要的是不要将 Lang 搜索标准更改为排除。
我还将“忽略删除失败”设置为“是”。
我已将“迁移功能状态”设置为“否”,但我认为这与 LE 版本无关。
user2321103's answer is excellent, creating the new upgrade entry in Upgrade Paths is the key thing. It is unfortunate that this option is hidden away as it is required in order to produce what most people would naturally expect to be the normal default behaviour for a setup program.
The reason for this new answer is that I found that I could set the Max Version in the Upgrade Entry to a higher number rather than the current version. This means I won't have to remember to update this for every new release. My current version is 2.1.8 so I set Max Version to 2.1.9999. In the unlikely event that I might want different behaviour in some future release I can up my version to 2.2.x
The Microsoft Setup Project would automatically update the Product Code whenever you altered the version number, but Installshield LE doesn't, so will need to remember to do this every time.
As the other answers state, it is important that the Upgrade Entry uses the Upgrade code from the previous installed versions. I haven't tried this, but presumably if for some reason you have more than one previous version with different upgrade codes, then you can create a separate upgrade entry for each.
I don't understand why you can't just set both Include Min Version and Include Max Version to No, but this doesn't seem to work. I have not tried every combination of these different parameters but as stated in the other answer the following settings seem to do the trick:
It also seems to be important not to change Lang Search Criterion to Exclude.
I have also set Ignore remove failure to Yes.
I have Migrate Feature States set to No, but I don't think this is relevant for the LE edition anyway.
如果我能再提出一个答案,我就能够创建一种升级路径,不需要根据通用的
ISPreventDowngrade
升级路径设置/更新特定的升级代码、最小或最大版本。根据最大版本说明中的警告说明,您必须为至少一项版本设置指定一个值:最小版本、最大版本或两者。
因此,我将最大版本设置为通用版本占位符。完成后,我不需要设置最大版本。所以我的配置如下:{00000000-0000-0000-0000-000000000000}
(将替换为当前安装程序升级代码的通用占位符)***ALL_VERSIONS***
(版本占位符)所有其他字段我均保持不变。请参阅http://helpnet.flexerasoftware.com/installshield23helplib/helplibrary/PreventingDowngrades.htm 了解更多信息,但请注意拼写错误。上面两个占位符都打错了;我从
ISPreventDowngrade
升级路径中使用的数据中获取了它们。If I can throw one more answer in the hat, I was able to make an upgrade path that does not require setting/updating a specific Upgrade Code, Min or Max Version based on the generic
ISPreventDowngrade
upgrade path. According to the cautionary note in the Max Version description,You must specify a value for at least one of the version settings: Min Version, Max Version, or both.
So I set the Max version to a generic placeholder. This done, I am not required to set a Max Version. So my configuration is as follows:{00000000-0000-0000-0000-000000000000}
(generic placeholder that will be replaced with current installer's upgrade code)***ALL_VERSIONS***
(version placeholder)All other fields I left unchanged. See http://helpnet.flexerasoftware.com/installshield23helplib/helplibrary/PreventingDowngrades.htm for more information, but beware the typos. Both the placeholders above are mistyped; I obtained them from the data used in the
ISPreventDowngrade
upgrade path.