[wix-users] Firegiant tutorial (slightly modified) results in compile error

Bob Arnson bob at firegiant.com
Fri Nov 13 16:01:30 PST 2015


Tutorial bug. Action="create" means "create the variable only if it doesn't already exist," so Part="last" doesn't make sense. I filed that bug for FireGiant to fix.

WiX.chm could be clearer. The current "[c]reates the environment variable if it does not exist" would be better as "[c]reates the environment variable **ONLY** if it does not exist."

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Friday, 13 November, 2015 18:44
To: WiX Uses (wix-users at lists.wixtoolset.org) <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Firegiant tutorial (slightly modified) results in compile error

When I use code from the tutorial here:
https://www.firegiant.com/wix/tutorial/com-expression-syntax-miscellanea/environmentally-friendly/

(except that I did not use Environment/@Permanent) <Environment Id='UpdatePath' Name='PATH' Action='create' System='yes' Part='last' Value='[INSTALLDIR]' />

I get the following error (which is clear but contrary to the sample code at the above link)
  Error CMDL0036: The Environment/@Part Attribute cannot be specified when the attribute Action is present with the value 'create'.

I changed my Environment/@Action="set" and got a functional MSI (yet to be tested in all scenarios).  I am just wondering if the tutorial has an error?

It also seems strange that the chm (wix 3.10.0.2103) for Wix:Environment element indicates that both 'create' and 'set' create the variable if does not exist, so I also wonder if the chm has an error?

Thanks!
Phill

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list