当我安装.msi文件时,我在开始菜单和桌面上生成了快捷方式,但是当我卸载桌面快捷方式时,删除了开始菜单。我的代码是波纹管。请帮助我解决我的问题。我花了将近 1 天的时间。
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuSubfolder" Name="Kiosk">
<Component Id="ApplicationShortcuts" Guid="12345678-1234-1234-1234-333333333333">
<Shortcut Id="ApplicationShortcut1" Name="Kiosk" Description="Solusoft Product" Target="[INSTALLDIR]AMP1.0.0.0mpkiosk.exe" WorkingDirectory="INSTALLDIR"/>
<RegistryValue Root="HKCU" Key="SoftwareKiosk" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
<RemoveFolder Id="ApplicationShortcut1" On="uninstall"/>
</Component>
</Directory>
</Directory>
就我而言,在组件上,我有 GUID="*",并且没有删除 shorcuts。
我使用了硬编码的GUID,例如:Guid="cc509cb7-c1a1-46cf-8c62-7cbb0017783c",快捷方式被删除。
问候。
你的代码有错误。
而不是:
<RemoveFolder Id="ApplicationShortcut1" On="uninstall"/>
用:
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall"/>
这应该可以做到。
就我而言,我正在尝试不同的选项,并且有一个具有相同 GUID 的注释部分。将其更改为不同的 GUID,即使另一个被注释掉,也可以工作。
下面是我在项目中使用的代码。希望,它会有所帮助。我认为您可以使用"删除文件"而不是"删除文件夹",并且不要忘记将"名称"属性放入其中。
<RegistryKey Action="createAndRemoveOnUninstall" Root="HKCU"
Key="Software$(var.ManufacturerEng)$(var.ProductName)$(var.ApplicationName)">
<RegistryValue Name="ShortcutService"
Type="integer" Value="1"
KeyPath="yes">
</RegistryValue>
</RegistryKey>
<Shortcut Advertise="no" Directory="ApplicationProgramsFolder"
Name="ServiceCC"
Target="[INSTALLLOCATION]Service.exe"
Id="SHORTCUT_serv"
WorkingDirectory="INSTALLLOCATION">
</Shortcut>
<RemoveFile Id="remove_serviceshort" Name="ServiceCC" On="uninstall"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
</Component>
就我而言,这是一个复制粘贴错误。 我对组件使用相同的 Guid,因为我在该文件夹中为其创建了快捷方式的另一个产品。 因此,卸载时删除图标失败