WiX 安装程序在卸载时不删除文件 [英] WiX installer not removing files on uninstall

查看:48
本文介绍了WiX 安装程序在卸载时不删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我告诉 wix MSI 文件在卸载时删除文件,但它根本没有注册它.

I am telling a wix MSI file to remove files on uninstall, and it's simply not registering it.

对于捆绑包,我这样称呼 MSI 文件:

For the bundle I call the MSI file thusly:

<MsiPackage SourceFile="..\..\..\..\Kiosk\MyProject\bin\Release\MyProject.msi"        Name="MyProject.msi" DisplayInternalUI="yes" Permanent="no" />

在 MSI 文件中,我称之为:

And in the MSI file I call this:

<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 文件本身.程序安装正常,但删除似乎根本不起作用.

Why are the files not being deleted? I have tried from both the burn exe file and the MSI file itself. The program installs fine, but the removal seems to not work at all.

推荐答案

SO,我发现了我的问题所在.

SO, I found out what my issue was.

我没有正确添加 guid.现在可以正确删除文件和文件夹.

I wasn't properly adding the guids. The files and folders now properly get removed.

这篇关于WiX 安装程序在卸载时不删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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