我想根据用户输入为快捷方式指定不同的名称。使用WiX工具集是否可行?我尝试将属性值分配给Name
元素的Shortcut
属性,但它不起作用。
答案 0 :(得分:2)
Shortcut Table的Name列不是Formatted类型,因此无法在运行时使用[PROPERTY]来改变它。
我知道如何做的唯一方法是:
答案 1 :(得分:0)
我使用此解决方法:
<CustomAction Id="SetShortcutFolder" Return="check" Property="ProgramMenuDir" Value="[ProgramMenuFolder][PRODUCTNAME]"></CustomAction>
<!--Setting up the shortcuts for the product-->
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="TempName"/>
</Directory>
<!--Set the install path to match the path of the product already installed-->
<Custom Action="SetInstallPath" Before="CostFinalize"/>
希望这会有所帮助.. :)
答案 2 :(得分:-1)
如果您正在进行大量翻译并说出大量排列,那么这是一个真正的缺点。您可能更愿意使用Windows API编写快捷方式,而不是使用WIX(这是我曾经使用过的最混淆的API之一)。