I am running in to something the same and the logic is screwing me up. I have the following: <?ifdef $(env.PRODUCT_CODE) ?> <?define GenProductCode = $(env.PRODUCT_CODE) ?> <?else?> <?define GenProductCode = "*" ?> <?endif?>
If the environment variable PRODUCT_CODE exists then the output from this is the generation of the GenProductCode varible with "*" as the value. To me that just looks wrong as if PRODUCT_CODE exists then it should have made GenProductCode = PRODUCT_CODE. So why does that logic not work? If PRODUCT_COODE does not exist then I receive the build error that PRODUCT_CODE is not defined. So can someone explain the logic to checking if an environment variable exists and if so then set a variable to the value otherwise set the variable to a default value? Thanks, Tim. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/ifdef-not-working-for-env-variable-tp688155p7587295.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users