visual-studio-2008 - Wix 不会删除 VS 2008 中卸载时的快捷方式

标签 visual-studio-2008 wix wix3

由于某种原因,Wix 快捷方式在卸载时不会被删除。

这是我的代码:

  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLDIR" Name="App">

      <Component Id="AppExecutable" DiskId="1" Guid="12854481-BE33-4733-8B46-FDB424057C9A">
        <File Id="App1ExecutableFile" Source="$(var.RESOURCEDIR)\App.exe" KeyPath="yes">
        </File>
      </Component>

    </Directory>
  </Directory>

  <Directory Id="ProgramMenuFolder" Name="PMFiles">
    <Directory Id="AppShortcutDirectory" Name="App for OS">

      <Component Id="App1Shortcuts" DiskId="1" Guid="">
        <RegistryValue Root="HKCU" Key="[ApplicationRegistryPath]\MsiInstaller\GuestShortcutsAreInstalled" Type="string" Value="" KeyPath="yes" />

        <Shortcut Id="App1ExecutableShortcut" Directory="AppShortcutDirectory"
                  Target="[#App1ExecutableFile]" Name="App"
                  WorkingDirectory="INSTALLDIR" Description="Run the App" Advertise="no" />

        <RemoveFolder Id="DelteShortcutFolder1" Directory="AppShortcutDirectory" On="uninstall" />

      </Component>
    </Directory>
  </Directory>

谢谢!

最佳答案

快捷方式所在组件的Guid为空字符串。看看是什么documentation says关于它:

It's also possible to set the value to an empty string to specify an unmanaged component. Unmanaged components are a security vulnerability because the component cannot be removed or repaired by Windows Installer (it is essentially an unpatchable, permanent component).

因此,请在此处放置一个有效的 GUID 或仅放置“*”来解决此问题。

关于visual-studio-2008 - Wix 不会删除 VS 2008 中卸载时的快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4278125/

相关文章:

wix - 如何更改 Wix 安装程序对话框中的文本?

c# - Visual Studio 安装项目

c# - 将子类转换为继承类

wix - 如何在不重新启动任何组件的情况下强制安装 MSI - 而是强制重新启动

WiX - 如果注册表搜索失败,如何安装到备用路径

WiX 服务安装程序和自定义安装事件

Wix 安装程序 - 调整 fatal error 对话框的大小或使用自定义对话框代替 fatal error 对话框

wix - 使用 heat.exe 将批量文件添加到新的 WiX 项目 : HEAT5150

visual-studio - 使用 Visual Studio 的版本选择器选择要打开旧 .sln-s 的 Visual Studio

c# - SQL Server 选择和插入问题