【发布时间】:2009-01-22 20:24:20
【问题描述】:
如何使用 WiX 在 Windows 开始菜单中创建子文件夹(深几级)?
目前我可以将快捷方式放在“开始”菜单中,但只能放在“程序”下的文件夹中(开始/程序/MyFolder),但我想更深地嵌套快捷方式(开始/程序/MyPlatform/MyProduct/等.)。我尝试了不同的组合,但是唉。
<DirectoryRef Id="StartMenuMyProduct">
<Component Id="ApplicationShortcut" Guid="{PUT-SOME-GUID-HERE}">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Configure My Product"
Description="Add or remove this and that"
Target="[MYPRODUCTDIR]ConfigureMyProduct.exe"
WorkingDirectory="MYPRODUCTDIR"/>
<RemoveFolder Id="StartMenuMyProduct"
On="uninstall"/>
<RemoveFolder Id="StartMenuMyPlatform"
On="uninstall"/>
<RegistryValue Root="HKCU"
Key="SOFTWARE\MyCompany\MyPlatform\My Product"
Name="Installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
<!-- Shortcut to the configuration utility in the Windows Start menu -->
<Directory Id="ProgramMenuFolder">
<!--<Directory Id="StartMenuMyPlatform" Name="MyPlatform">-->
<Directory Id="StartMenuMyProduct" Name="My Product" />
<!--</Directory>-->
</Directory>
【问题讨论】:
-
好问题,没试过...
-
顺便说一句,您的 GUID(如果您关心它保持“全球唯一 ID”;-),您不应该发布它)看起来是手工制作的。您应该只使用 Visual Studio 附带的 uuidgen.exe 或其他一些 guid 生成器。
-
呵呵,谢谢,已更正。是的,我知道,我从我的源代码中复制并添加了一堆零,然后才发布到这里!
标签: installation wix windows-installer wix3