MSI 升级仅复制安装文件夹中的 DLL,其余部分在首次启动时复制
我有一个使用 msi 安装程序部署的应用程序。它是版本 2。在安装此安装的最新版本时,安装程序会将所有内容复制到程序文件夹(dll、exe、资源文件)中。
但是当将此应用程序从版本 1 升级到版本 2 时,会发生一些奇怪的事情。升级很好,它删除了以前的文件并将 DLL 复制到该文件夹中并完成安装向导。
当我现在查看安装文件夹时,仅存在 DLL。 当我第一次从开始菜单运行该应用程序时,它会触发 MSI 快捷方式,并且安装程序会再次显示以进行一些配置。现在它复制可执行文件和资源文件并启动应用程序。
为什么安装程序不复制升级时的所有内容?我希望这是这种行为,因为第一次启动此应用程序的用户可能没有足够的访问权限进行此类操作
I have an application which is deployed with an msi installer. It's version 2. When installing this latest version of this installation, the installer copies everything into the program folder (dlls,exe,resourcefiles).
But when upgrading this application from Version 1 to 2, some strange things happen. The upgrade is good, and it removes the previous files and copies the DLLs into the folder and completes the installation wizard.
When I now look in the installation folder ONLY the DLLs are present.
When I run the application from the start menu for the first time, it fires a MSI shortcut and the installer shows up again to do some configuration. Now it copies the executable and the resource files and starts the application.
Why doesn't the installer copy everything on the upgrade? I want to this to be the behaviour because the users who will start this app for the first time may not have sufficient access rights for this kind of operation
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
升级期间,Windows Installer 使用文件版本控制规则 确定文件是否已安装。要在升级期间安装所有文件,您可以确保:
Windows Installer 根据组件的关键来评估是否安装组件 成员。因此,如果关键成员文件的版本高于计算机上的版本,则会安装该组件。
另一个解决方案是在 文件 表到一个较高的值,例如 65535.65535.65535.65535。这样,Windows Installer 将始终认为 MSI 中的文件比目标计算机上安装的文件更新。
During an upgrade Windows Installer uses the file versioning rules to determine if a file is installed or not. To install all files during an upgrade you can make sure that:
Windows Installer evaluates if a component will be installed or not based on it's key member. So if the key member file has a higher version than what's on the machine, that component is installed.
Another solution is to set the Version column in File table to a high value, for example 65535.65535.65535.65535. This way Windows Installer will always consider the file in your MSI newer than what's installed on the target machine.