【问题标题】:WiX Setup project programmenu shortcut without uninstall option没有卸载选项的 WiX 设置项目程序快捷方式
【发布时间】:2018-04-19 08:54:06
【问题描述】:

我已经设置了一个 wix 设置项目来生成我的应用程序的 msi 安装程序。我创建了一个桌面快捷方式和一个程序菜单快捷方式。为了获得程序菜单快捷方式,我必须在快捷方式组件中指定一个 RemoveFolder 元素,这实际上是用它创建一个卸载快捷方式。

我的问题是,有没有办法在没有卸载快捷方式的情况下创建程序菜单快捷方式?我希望用户从控制面板中的添加/删除程序中卸载。

我不能简单地添加programnu 快捷方式,但是使用我的应用程序的唯一方法是通过桌面快捷方式。如果他们无法通过开始/程序菜单找到应用程序,这将不是一个好的用户体验。因此我想要一个程序菜单快捷方式,但没有卸载快捷方式。

任何帮助将不胜感激。

【问题讨论】:

    标签: wix windows-installer shortcut uninstallation


    【解决方案1】:

    我意识到首先要问这个问题很愚蠢。我所要做的就是删除一行代码。

    <!-- Start Menu Shortcut-->
    <DirectoryRef Id="ApplicationProgramsFolder">
        <Component Id="ApplicationShortcut" Guid="PUT-GUID-HERE">
            <Shortcut Id="ApplicationStartMenuShortcut" Name="devapp" Description="My Application" Target="[#devapp.exe]" WorkingDirectory="APPLICATIONROOTDIRECTORY" />
            <!-- Uncomment the line below to have an uninstall shortcut in the program menu. -->
            <!--<Shortcut Id="UninstallProduct" Name="Uninstall devapp" Description="Uninstalls devapp" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" />-->
            <RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall" />
            <RegistryValue Root="HKCU" Key="Software\CompanyName\ApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-05
      • 2012-07-31
      相关资源
      最近更新 更多