如何燮preSS对话 [英] How to suppress a dialog

查看:261
本文介绍了如何燮preSS对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我标志着如下对话框,隐藏在维克斯,但尚未它仍然在卸载时显示文件正在使用:

I have marked the following dialog as Hidden in WiX but yet it is still show on an uninstall when files are in use:

<Dialog Id="FilesInUse" X="50" Y="50" Width="361" Height="177" Title="[ProductName] Files in Use" Hidden="yes">
  <Control Id="RetryButton" Type="PushButton" X="99" Y="150" Width="81" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&amp;Try Again" TabSkip="no" Default="yes">
    <Publish Event="EndDialog" Value="Retry" />
  </Control>
  <Control Id="ContinueButton" Type="PushButton" X="186" Y="150" Width="81" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&amp;Continue" TabSkip="no">
    <Publish Event="EndDialog" Value="Ignore" />
  </Control>
  <Control Id="ExitButton" Type="PushButton" X="273" Y="150" Width="81" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}E&amp;xit Installation" TabSkip="no" Cancel="yes">
    <Publish Event="EndDialog" Value="Exit" />
  </Control>
  <Control Id="ListFilesInUse" Type="ListBox" X="8" Y="64" Width="348" Height="62" Property="FileInUseProcess" Text="{\VSI_MS_Sans_Serif13.0_0_0}MsiFilesInUse" TabSkip="no" Sunken="yes" Sorted="yes" />
  <Control Id="InstallBodyText" Type="Text" X="6" Y="9" Width="345" Height="43" Text="{\VSI_MS_Sans_Serif13.0_0_0}The following applications are using files which the installer must update. You can either close the applications and click &quot;Try Again&quot;, or click &quot;Continue&quot; so that the installer continues the installation (a reboot may be required to replace these files on a restart)." TabSkip="yes" NoPrefix="yes">
    <Condition Action="show"><![CDATA[REMOVE=""]]></Condition>
    <Condition Action="hide"><![CDATA[REMOVE<>""]]></Condition>
  </Control>
  <Control Id="RemoveBodyText" Type="Text" X="6" Y="9" Width="345" Height="36" Text="{\VSI_MS_Sans_Serif13.0_0_0}The following applications are using files which the installer must remove. You can either close the applications and click &quot;Try Again&quot;, or click &quot;Continue&quot; so that the installer continues the installation (a reboot may be required to replace these files on a restart)." TabSkip="yes" NoPrefix="yes">
    <Condition Action="show"><![CDATA[REMOVE<>""]]></Condition>
    <Condition Action="hide"><![CDATA[REMOVE=""]]></Condition>
  </Control>
</Dialog>

我怎么能晚饭preSS该对话框?

How can I suppress this dialog?

注:此对话框必须是present,否则安装程序会抛出错误2803:对话框视图找不到一条记录的对话框。我只需要为不显示给用户以某种方式,或者(如果可能)选择一种选择他们。

Note: This dialog needs to be present or else the installer throws error 2803: dialog view did not find a record for the dialog. I just need to not display it to the user somehow, or (if possible) to choose a selection for them.

推荐答案

据上installsite提示(见下文),这似乎不是不可能的,因为它是一个Windows操作系统的行为。从我自己的经验,绕过这个问题的另一种方法是有一个自定义操作,以检测正在运行的进程,然后该进程正在运行提示用户卸载之前关闭该应用程序。在运行过程中卸载的应用程序并不好,它可能会留下一些文件和注册表项,除非你做一个干净的卸载下一次或手动删除它们。

According to the tips on installsite (see below), this does not seem not possible, since it is a Windows OS behavior. From my own experience, an alternative way to bypass this issue is to have a custom action to detect the running process and then prompt user that the process is running, close that app before uninstall. Uninstall an app while it is running is not good, it may leave some files and registry entries unless you do a clean uninstall next time or manually delete them.

我如何prevent的FilesInUse对话框,显示<? / A>

How do I prevent the FilesInUse Dialog from displaying?

设置对话框表的属性列的FilesInUse   对话为0。

Set the Attributes column of the Dialog table for the FilesInUse dialog to 0.

根据你的创作工具,这相当于标记   对话是隐藏,无模式,和NoMinimize。

Depending on your authoring tool, this is equivalent to marking the dialog to be "hidden", "modeless", and "NoMinimize".

注意:如果您的设置与运行全部或简化的用户界面这一招才有效。在基本的UI模式的Windows Installer使用其   自己内置的对话,而不是你在MSI撰写的对话   文件。

Note that this trick will only work if your setup runs with full or reduced user interface. In basic UI mode Windows Installer uses its own built-in dialogs instead of the dialogs you authored in the msi file.

这篇关于如何燮preSS对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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