WiX condition properties passed from command line don't work?

拜拜、爱过 提交于 2019-12-05 12:15:13
Rob Mensching

Two things since there are two questions here:

  1. Advertised Shortcuts must be in the same Component that installs the File they point at. That is requried because the Windows Installer points an advertised Shorcut at the KeyPath of the Component. So, you can't use advertised Shorcuts if you want them to be optionally installed.

I have a blog post about how to create a shorcut and pass validation.

  1. The Properties you are using need to be marked secure to pass from the install UI process to the server-side. To do that just do

    <Property Id="INSTALLSTARTMENUSHORTCUT" Secure="yes"/>

Notice that I did not add a Value attribute. If you specify a Value, even if it is 0, then your INSTALLSTARTMENUSHORCUT will evaluate to TRUE. A blank/non-defined Property is FALSE, any other value is TRUE.

Have you tried marking the properties as secure?

<Property Id="INSTALLSTARTMENUSHORTCUT" Value="0" Secure="Yes" />

Looking at the documentation for the Shortcut Table I don't think you can get conditionally advertised shortcuts. We get around this by installing an Advertised start menu shortcut, and a regular desktop shortcut.

If IIRC Advertise has to bet set at Yes

You have seen this example from MindCapers here, I had trouble with the Shorcuts until I created the registry entry.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!