Dav*_*vy8 4 shortcuts installer conditional wix wix3
我有一个属性,用于是否安装需要通过命令行参数传递的快捷方式.当我在wxs文件中设置属性时,条件似乎有效,但在通过命令行设置它们时似乎会忽略它们.从日志中我看到它们正在被设置:
MSI (s) (24:C8) [11:01:32:234]: PROPERTY CHANGE: Modifying INSTALLSTARTUPSHORTCUT property. Its current value is '0'. Its new value: '1'.
MSI (s) (24:C8) [11:01:32:234]: PROPERTY CHANGE: Modifying INSTALLSTARTMENUSHORTCUT property. Its current value is '0'. Its new value: '1'.
MSI (s) (24:C8) [11:01:32:234]: PROPERTY CHANGE: Modifying INSTALLDESKTOPSHORTCUT property. Its current value is '0'. Its new value: '1'.
Run Code Online (Sandbox Code Playgroud)
但是,他们没有安装快捷方式.
而且,似乎因为他们需要在他们自己的组件中才能为他们设置条件,所以他们不能再做广告的快捷方式.您将如何获得有条件安装的广告快捷方式?
当前快捷键代码:
<Property Id="INSTALLSTARTMENUSHORTCUT" Value="0"/>
...
<Component Id="StartMenuShortcut" Guid="MY-GUID">
<Condition>INSTALLSTARTMENUSHORTCUT</Condition>
<Shortcut Id="StartMenuServerShortcut"
Directory="ProgramMenuDir"
Name="Application Name" WorkingDirectory="INSTALLDIR" Advertise="no"
Target="[!FileEXE]"
Icon="Icon.ico" />
</Component>
Run Code Online (Sandbox Code Playgroud)
并重复其他快捷方式
编辑:
尝试Sacha建议并添加以下内容:
<Property Id="INSTALLSTARTUPSHORTCUT" Value="0" Secure="yes"/>
<Property Id="INSTALLDESKTOPSHORTCUT" Value="0" Secure="yes"/>
<Property Id="INSTALLSTARTMENUSHORTCUT" Value="0" Secure="yes"/>
Run Code Online (Sandbox Code Playgroud)
现在它安装了所有快捷方式,即使它们在xml和命令行中都设置为0.我传递的命令行是:
msiexec /i MySetup.msi INSTALLSTARTUPSHORTCUT=0 INSTALLDESKTOPSHORTCUT=0 INSTALLSTARTMENUSHORTCUT=0 /l*v inst.log /qb
Run Code Online (Sandbox Code Playgroud)
尝试将值放在引号中但仍然没有去.这里没有显示,但我成功地通过执行ALLUSERS =""或ALLUSERS ="2"来操纵ALLUSERS属性来执行每用户或每个机器的注册表因此传入属性应该是可能的,但我不确定是什么我做错了.
Rob*_*ing 10
有两件事,因为这里有两个问题:
您正在使用的属性需要标记为安全,以便从安装UI进程传递到服务器端.要做到这一点
<Property Id ="INSTALLSTARTMENUSHORTCUT"Secure ="yes"/>
请注意,我没有添加Value属性.如果指定值,即使它为0,则INSTALLSTARTMENUSHORCUT将评估为TRUE.空白/未定义的属性为FALSE,任何其他值为TRUE.
| 归档时间: |
|
| 查看次数: |
6933 次 |
| 最近记录: |