如何在修复和更改模式下使用WiX安装程序3.7重新安装快捷方式图标

时间:2015-04-10 09:00:22

标签: wix

我是Wix安装程序的新用户,我一直在尝试在“更改”和“修复”模式下在桌面等上重新安装快捷方式图标,但它无法正常工作。它仅适用于安装模式。有人可以帮我解决这个问题吗?

以下是使用的代码:

<DirectoryRef Id="ApplicationProgramsFolder">
     <Component Id="ApplicationShortcuts" Guid="{964EEA43FA8A}">

        <Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.ShortcutText)" Advertise="yes" Description="$(var.ShortcutComment)" Target="[ProductDir]$(var.ShortcutTarget)" WorkingDirectory="ProductDir" Icon="AA.exe" />

        <?if $(var.AA) != "True" ?>

           <Shortcut Id="ApplicationDesktopShortcut" Directory="DesktopFolder" Name="$(var.ShortcutText)" Target="[ProductDir]$(var.ShortcutTarget)" WorkingDirectory="ProductDir" Icon="AA.exe" Description="$(var.ShortcutComment)" />

        <?endif?>

        <?if $(var.Configuration) = "Debug" ?>

           <Shortcut Id="UninstallProduct" Name="Uninstall $(var.AAName)" Description="Uninstall $(var.YAName)" Target="[SystemFolder]msiexec.exe" Arguments="/x [ProductCode]" />

        <?endif?>

        <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />

        <RegistryValue Root="HKCU" Key="Software\Microsoft\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes" />
     </Component>

     <Component Id="OnUninstall" Guid="{739C22AD-8716F39}">

        <CreateFolder/>

        <RemoveFile Id="RemoveFiles" Directory="ProductDir" Name="*.*" On="uninstall" />

        <RegistryValue Root="HKCU" KeyPath="yes" Id="BogusKey" Name="Foom" Type="string" Key="Torp" Value="Geekle" />

     </Component>

  </DirectoryRef>

0 个答案:

没有答案
相关问题