使用 WiX 创建桌面快捷方式 [英] Create shortcut to desktop using WiX

查看:38
本文介绍了使用 WiX 创建桌面快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过 wix 设置项目在桌面上创建快捷方式?

How do I create a shortcut on the desktop from a wix setup project?

推荐答案

快捷方式是非广告的,希望对大家有所帮助.请记住将组件放在您的功能标签中.

The shortcut is a non-advertised one, hope this helps someone. Remember to put the component in your feature tag.

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="DesktopFolder" Name="Desktop">
        <Component Id="ApplicationShortcutDesktop" Guid="*">
            <Shortcut Id="ApplicationDesktopShortcut"
                Name="Text under your icon"
                Description="Comment field in your shortcut"
                Target="[MYAPPDIRPROPERTY]MyApp.exe"
                WorkingDirectory="MYAPPDIRPROPERTY"/>
            <RemoveFolder Id="DesktopFolder" On="uninstall"/>
            <RegistryValue
                Root="HKCU"
                Key="SoftwareMyCompanyMyApplicationName"
                Name="installed"
                Type="integer"
                Value="1"
                KeyPath="yes"/>
        </Component>
    </Directory>

    <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="MyCompany" Name="MyCompany">
            <Directory Id="MYAPPDIRPROPERTY" Name="MyAppName">
                <!-- main installation files -->
            </Directory>
        </Directory>
    </Directory>
</Directory>

这篇关于使用 WiX 创建桌面快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆