我告诉 wix MSI 文件在卸载时删除文件,它根本没有注册它。
对于捆绑包,我因此调用 MSI 文件:
<MsiPackage SourceFile="..\..\..\..\Kiosk\MyProject\bin\Release\MyProject.msi" Name="MyProject.msi" DisplayInternalUI="yes" Permanent="no" />
在 MSI 文件中,我称之为:
<ComponentGroup Id="Purge" Directory="INSTALLFOLDER">
<Component Id="PurgeFiles" Guid="">
<RemoveFile Id="RemoveBaseFolder" Name="*" On="uninstall" Directory="INSTALLFOLDER" />
<RemoveFile Id="RemoveLanguage_af" Directory="Language_af" Name="*.*" On="uninstall"/>
<RemoveFile Id="RemoveLanguage_de" Name="*.*" On="uninstall" Directory="Language_de"/>
<RemoveFile Id="RemoveLanguage_es" Name="*.*" On="uninstall" Directory="Language_es"/>
<RemoveFile Id="RemoveLanguage_fr" Name="*.*" On="uninstall" Directory="Language_fr"/>
<RemoveFile Id="RemoveLanguage_it" Name="*.*" On="uninstall" Directory="Language_it"/>
<RemoveFile Id="RemoveLanguage_ja" Name="*.*" On="uninstall" Directory="Language_ja"/>
<RemoveFile Id="RemoveLanguage_ko" Name="*.*" On="uninstall" Directory="Language_ko"/>
<RemoveFile Id="RemoveLanguage_ru" Name="*.*" On="uninstall" Directory="Language_ru"/>
<RemoveFile Id="Removezh_CN" Name="*.*" On="uninstall" Directory="zh_CN"/>
<RemoveFile Id="RemoveDatabase" Name="*.*" On="uninstall" Directory="Database"/>
<RemoveFile Id="RemoveFileData" Name="*.*" On="uninstall" Directory="FileData"/>
<RemoveFile Id="RemoveRecordingTempData" Name="*.*" On="uninstall" Directory="RecordingTempData"/>
<RemoveFile Id="RemoveSignatureData" Name="*.*" On="uninstall" Directory="SignatureData"/>
<RemoveFile Id="RemoveCacheUpdater" Name="*.*" On="uninstall" Directory="CacheUpdater"/>
<RemoveFile Id="RemoveRecordingUploader" Name="*.*" On="uninstall" Directory="RecordingUploader"/>
</Component>
</ComponentGroup>
然后我引用组件组:
<Feature Id="ProductFeature" Title="CacheUpdaterInstaller" Level="1">
<ComponentGroupRef Id="Purge"/>
</Feature>
为什么文件没有被删除?我已经尝试过烧录 exe 文件和 MSI 文件本身。该程序安装良好,但删除似乎根本不起作用。