Wix-从命令行定义要传递给CustomAction的属性值

时间:2019-01-02 18:14:29

标签: wix windows-installer custom-action

如何正确定义值公共属性(FLAG)并将该值传递给CustomAction?

<Property Id="FLAG" Value="none" Secure="yes"/>
<CustomAction Id="SetPathToRemove" Property="ShowRemoveFilesDialog" Value="RemoveDataFlagKey=[FLAG]" />
<CustomAction Id="ShowRemoveFilesDialog" BinaryKey='CustomActionsBinary' DllEntry='ShowDialogRemoveFiles'
              Execute='deferred' Return='ignore' Impersonate='no'/>

CustomAction:

  

var flag_remove = session.CustomActionData [“ RemoveDataFlagKey”];                   MessageBox.Show(flag_remove);

命令行:

  

./ AppInstaller.exe / uninstall FLAG =“删除”

当我在命令行中执行上面的行时,消息框中显示的值仅显示默认属性值(“无”),而不显示通过命令行定义的值(“删除”)。我在做什么错了?

0 个答案:

没有答案