>Installer在桌面上创建2个快捷方式:文件(FS(和互联网快捷方式(IS(。卸载时FS
删除正常,但IS
仍然存在。然后我FS
评论并测试。现在它已成功创建和删除。
怎么了?
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id="DesktopFolder" Name="Desktop"/>
<Directory Id="ProgramMenuFolder" Name="PMenu">
<Directory Id="ProgramMenuDir" Name="Advertised Shortcut" />
</Directory>
</Directory>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutConf" Guid="{9FF60FF5-F1A2-413F-98FB-CF7B3101F10F}">
<Shortcut Id="CompanyUtilConfigurator1"
Directory="DesktopFolder"
Advertise="no"
Name="Company Util Configurator"
WorkingDirectory="INSTALLDIR"
Icon="CompanyUtilConfiguratorIcon.exe">
</Shortcut>
<RegistryValue Root="HKCU" Key="SoftwareCompany LLCCompanyUtil" Name="installed_conf" Type="integer" Value="1" KeyPath="yes"/>
<RemoveFolder Id="DeleteShortcutFolder1"
Directory="DesktopFolder"
On="uninstall" />
</Component>
<Component Id="ApplicationShortcut" Guid="{77C005A8-63DC-43F1-9081-84157EDED0B3}">
<Condition><![CDATA[WS_SHORTCUT_NAME<>""]]></Condition>
<util:InternetShortcut
Id="Home"
Directory="DesktopFolder"
Name="Company Util" Type="url"
Target="[WS_SHORTCUT_NAME]"/>
<RemoveFolder Id="DesktopFolder2" Directory="DesktopFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="SoftwareCompany LLCCompanyUtil" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
我为您的问题尝试了此代码,它可以工作
<RegistryKey Root="HKCU" Key="!(wix.Manufacturer)!(wix.Product)" Action="createAndRemoveOnUninstall">
<RegistryValue Name="FirstShortCut" Type="integer" Value="1" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="FirstShortCut" Directory="DeskTopFolder" WorkingDirectory="INSTALLDIR" Advertise="no" Name="ShortCutA" Icon="chk_on.ico"/>
<Component Id="ShortCutB" Guid="{435CE3D7-047F-4bdb-9CDB-6A2AED1A1303}">
<RegistryKey Root="HKCU" Key="!(wix.Manufacturer)!(wix.Product)" Action="createAndRemoveOnUninstall">
<RegistryValue Name="SecondShortCut" Type="integer" Value="1" KeyPath="yes" />
</RegistryKey>
<util:InternetShortcut Id="SecondShortCut" Name="Second" Target="http://www.stackoverflow.com"/>
</Component>
</DirectoryRef>
试一试...此外,记录安装总是有帮助的在命令行中使用以下命令:
msiexec/i [msiname]/l*v [文件名]