wix - 使用 WiX 创建桌面快捷方式

标签 wix installation windows-installer shortcut

如何从 wix 安装项目在桌面上创建快捷方式?

最佳答案

该快捷方式是非公开的。 请记住将该组件放入您的功能标签中。

<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="Software\MyCompany\MyApplicationName"
                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 - 使用 WiX 创建桌面快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11868499/

相关文章:

objective-c - 从 cocoa 应用程序中查找软件包安装程序(如 DivX Installer.package)是否正在运行

windows-installer - 在安装过程中更改程序名称和快捷方式标题

r - 了解 install.packages() 行为重新存储和依赖关系

c# - VS2008 安装项目 : Uninstalling the previous MSI

visual-studio - 安装程序项目的 Visual Studio : How to name the . msi 输出文件?

electron - Electron NSIS阻止重新安装

installation - 避免手动添加组件

WiX 自定义操作 - 在目标目录中运行应用程序

windows - WiX,根据操作系统有条件地安装文件

installation - 从WiX路径中删除尾部斜杠