由于某种原因,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/