我有一种情况,我需要知道在更改模式下要安装/卸载哪些功能,因此我将能够修改对话框序列。
我的设置包括 2 个功能F_WEB_APP和F_DATABASE,为了让我的生活更轻松,我在自定义对话框的下一步按钮上发布了以下属性,以根据功能条件确定哪些功能已安装、要安装或要卸载,如下所示:
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsDBInstalled" Value="Yes" Order="5"><![CDATA[!F_DATABASE > 2]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsDBInstalled" Value="No" Order="6"><![CDATA[!F_DATABASE < 3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsWebInstalled" Value="Yes" Order="7"><![CDATA[!F_WEB_APP > 2]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsWebInstalled" Value="No" Order="8"><![CDATA[!F_WEB_APP < 3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsDBSelected" Value="Yes" Order="9"><![CDATA[&F_DATABASE > 2]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsDBSelected" Value="No" Order="10"><![CDATA[&F_DATABASE < 3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsWebSelected" Value="Yes" Order="11"><![CDATA[&F_WEB_APP > 2]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Property="IsWebSelected" Value="No" Order="12"><![CDATA[&F_WEB_APP < 3]]></Publish>
在第一次安装期间,我的所有属性都根据用户选择(预期行为)进行设置,但在更改/修改期间它们仅设置一次(在自定义对话框首次加载 - 值匹配现有状态,无论用户更改如何)!如果用户进行更改并按下一步或继续然后返回并更改所选功能并单击下一步,则没有设置任何属性...这里有什么问题?
首次安装的日志(为便于阅读而修剪):
Action 20:34:08: CustomizeDlg. Dialog created
* user modify features and press next.
MSI (c) (94:90) [20:34:09:374]: PROPERTY CHANGE: Adding IsDBInstalled property. Its value is 'No'.
MSI (c) (94:90) [20:34:09:376]: PROPERTY CHANGE: Adding IsWebInstalled property. Its value is 'No'.
MSI (c) (94:90) [20:34:09:378]: PROPERTY CHANGE: Adding IsDBSelected property. Its value is 'Yes'.
MSI (c) (94:90) [20:34:09:379]: PROPERTY CHANGE: Adding IsWebSelected property. Its value is 'Yes'.
Action 20:34:09: NextDlg. Dialog created
* user press back.
Action 20:34:09: CustomizeDlg. Dialog created
* user modify features and press next.
MSI (c) (94:90) [20:34:12:376]: PROPERTY CHANGE: Modifying IsWebSelected property. Its current value is 'Yes'. Its new value: 'No'.
Action 20:34:12: NextDlg. Dialog created
* user press back.
Action 20:34:13: CustomizeDlg. Dialog created
* user modify features and press next.
MSI (c) (94:90) [20:34:15:129]: PROPERTY CHANGE: Modifying IsDBSelected property. Its current value is 'Yes'. Its new value: 'No'.
Action 20:34:15: NextDlg. Dialog created
* user press back.
Action 20:34:15: CustomizeDlg. Dialog created
* user modify features and press next.
MSI (c) (94:90) [20:34:18:289]: PROPERTY CHANGE: Modifying IsWebSelected property. Its current value is 'No'. Its new value: 'Yes'.
Action 20:34:18: NextDlg. Dialog created
更改/修改日志(为便于阅读而修剪):
Action 21:01:41: CustomizeDlg. Dialog created
* user modify features and press next.
MSI (c) (6C:1C) [21:01:45:216]: PROPERTY CHANGE: Adding IsDBInstalled property. Its value is 'Yes'.
MSI (c) (6C:1C) [21:01:45:220]: PROPERTY CHANGE: Adding IsWebInstalled property. Its value is 'Yes'.
MSI (c) (6C:1C) [21:01:45:223]: PROPERTY CHANGE: Adding IsDBSelected property. Its value is 'No'.
MSI (c) (6C:1C) [21:01:45:225]: PROPERTY CHANGE: Adding IsWebSelected property. Its value is 'No'.
Action 21:01:45: NextDlg. Dialog created
* user press back.
Action 21:01:45: CustomizeDlg. Dialog created
* user modify features and press next.
Action 21:01:48: NextDlg. Dialog created
* user press back.
Action 21:01:49: CustomizeDlg. Dialog created
* user modify features and press next.
Action 21:01:51: NextDlg. Dialog created
* user press back.
Action 21:01:52: CustomizeDlg. Dialog created
* user modify features and press next.
Action 21:01:54: NextDlg. Dialog created
正如您从第二个日志中看到的那样,没有记录属性更改,我在这里缺少什么?
谢谢。