我有以下WiX XML文件:
<Binary Id='IISCustomActionBinary' SourceFile='$(var.Setup.CustomActions.TargetDir)$(var.Setup.CustomActions.TargetName).CA.dll' />
<CustomAction Id='IISCustomActionInstall' BinaryKey='IISCustomActionBinary' DllEntry='ConfigureIis' Execute='deferred'/>
<CustomAction Id='IISCustomActionUninstall' BinaryKey='IISCustomActionBinary' DllEntry='UnconfigureIis' Execute='deferred' />
<InstallExecuteSequence>
<Custom Action='IISCustomActionInstall' Before='InstallFinalize'>
NOT INSTALLED
</Custom>
<Custom Action='IISCustomActionUninstall' Before='InstallFinalize'>
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
“IISCustomActionInstall”自定义操作不仅在安装时执行,还在卸载时执行。我做错了什么?
答案 0 :(得分:3)
您应该使用的变量是Installed
。如果我没有弄错的话,Windows Installer会将INSTALLED
识别为单独的用户定义变量。