简体   繁体   English

如何使用 Inno Setup 安装程序升级 MSI 安装?

[英]How to upgrade an MSI install using Inno Setup installer?

We recently moved from a Visual Studio setup msi-based installer to Inno Setup but we're having issues with upgrading existing installs using this new installer.我们最近从基于 Visual Studio 安装 msi 的安装程序转移到了 Inno 安装程序,但我们在使用这个新安装程序升级现有安装时遇到了问题。 I know that the upgrade code remains static even as the product code changes every update, so I initially tried to set that as the AppId in the Inno Setup project, but that doesn't work.我知道即使产品代码每次更新都会更改,升级代码仍然保持静态,因此我最初尝试将其设置为 Inno Setup 项目中的 AppId,但这不起作用。 I then tried a number of other guid's none of which work.然后我尝试了一些其他的 guid,但没有一个工作。

Is there a way to properly upgrade an msi install with an Inno Setup installer?有没有办法使用 Inno Setup 安装程序正确升级 msi 安装?

No, I don't think so - InnoSetup is expressly NOT an MSI-based installer.不,我不这么认为 - InnoSetup 显然不是基于 MSI 的安装程序。

You will need to first properly uninstall your old MSI-based installation using eg msiexec /X (product-code or MSI file name), and then you can install the new stuff using InnoSetup.您需要首先使用例如 msiexec /X(产品代码或 MSI 文件名)正确卸载旧的基于 MSI 的安装,然后您可以使用 InnoSetup 安装新的东西。

To install an .MSI file from within an Inno Setup installation, try these lines:要从 Inno Setup 安装中安装 .MSI 文件,请尝试以下几行:

[Files]
Source: "Your-MSI-File.msi"; DestDir: "{tmp}"

[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\Your-MSI-File.msi"""

Credits for Alex Yackimoff http://www.jrsoftware.org/iskb.php?msi Alex Yackimoff 的学分http://www.jrsoftware.org/iskb.php?msi

It's not a good idea switching away from windows installer.离开 Windows 安装程序并不是一个好主意。 inno setup is a legacy install technology. inno setup 是一种传统的安装技术。

better stay on your msi, they are necessary for windows logo and they are future proof.最好留在你的 msi 上,它们是 Windows 标志所必需的,它们是未来的证明。

if you need a cost free tool for creating msi's or do you need something that integrates into continues integration perfectly, then take a look at WIX.如果您需要一个免费的工具来创建 msi,或者您是否需要完美集成到持续集成中的东西,那么请查看 WIX。

Windows Installer XML Windows 安装程序 XML

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM