如何让 Windows 安装程序 (WiX) 始终认为它正在运行升级或新安装? [英] How can I make windows installer (WiX) always think it is running an upgrade or new install?

查看:24
本文介绍了如何让 Windows 安装程序 (WiX) 始终认为它正在运行升级或新安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个 SQL 数据库的安装程序.它实际上不会更改本地计算机上的任何内容,而是连接到数据库进行更改.

This is an installer for a SQL database. It really does not change anything on the local computer but connects to a database to make changes.

用户可以从一台计算机升级 3 个不同的数据库服务器,因此他们应该能够使用相同的对话框运行它 3 次.

The user could be upgrading 3 different database servers from one computer so they should be able to run it 3 times utilizing the same dialogs.

我希望安装程序始终显示我设置的相同自定义对话框.我不希望它进入维护对话框.

I would like the installer to always show the same custom dialogs I have setup. I do not want it to go into the maintenance dialog.

我已经将 MajorUpgrade 标签设置为这样,文档说它涵盖了AllowSameVersionUpgrades"

I have set the MajorUpgrade tag as so, which the documentation says covers "AllowSameVersionUpgrades"

 <MajorUpgrade AllowDowngrades="yes" />

我尝试像这样更改对话框的下一步"按钮.NewDBDlg 是一个自定义屏幕.

I tried changing the dialogs "Next" buttons like so. NewDBDlg is a custom screen.

 <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="NewDBDlg">1</Publish>
 <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="NewDBDlg">1</Publish> 

这种工作,但它到达最后一个VerifyReadyDlg"屏幕,它大部分是空白的,只有一个返回"和取消"按钮.

This kind of works but it gets to the last "VerifyReadyDlg" screen and it is mostly blank with only a "Back" and "Cancel" button.

我是否朝着正确的方向前进,还是应该尝试其他方法,例如删除安装作为安装的一部分?

Am I heading in the right direction or should I try something else like remove the install as part of the installation?

推荐答案

有时我需要制作一个不是传统安装程序的 .MSI.它更像是一个实用程序,然后是一个已安装的应用程序.Microsoft 有时会使用 Microsoft Fix it 一系列实用程序来执行此操作.

Sometimes I need to make an .MSI that isn't really a traditional installer. It's more of a utility then an installed application. Microsoft does this sometimes with their Microsoft Fix it series of utilities.

这是一种不常见的情况,但可以通过抑制某些 Windows Installer 标准操作来实现:

This is an uncommon scenario but can be done by suppressing certain Windows Installer standard actions:

<InstallExecuteSequence>
  <RegisterProduct Suppress="yes" />
  <PublishFeatures Suppress="yes" />
  <PublishProduct Suppress="yes" />
</InstallExecuteSequence>

因为产品从来没有注册过安装服务,所以没有修复、卸载、升级、维护等.

Because the product is never registered with the installer service there is no repair, uninstall, upgrade, maintenance and so on.

这篇关于如何让 Windows 安装程序 (WiX) 始终认为它正在运行升级或新安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆