gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 06:40:45 25 4
gpt4 key购买 nike

由于某种原因,卸载时不会删除 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com