I believe your ifdef needs to be like this.
 
<?ifdef var.MyVar ?>

--
Harvey Werner
HP StorageWorks, NAS Division
971.327.5279


________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sameeksha
Chepe
Sent: Thursday, August 23, 2007 9:33 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] WIX preprocessor problem with variables



HI ALL, 

 

I am trying out WIX preprocessor directives ifdef / ifndef. For any
environment or local variable WIX is not able to set the 'ifdef'
condition to true, although the variable is defined. For example, the
condition <?ifdef $(env.TEMP)?> fails, same with <?ifdef
$(env.ProgramFiles)>. Similarly the following 2 statements do not work
as expected:-

<?define MyVar="MyValue"?>

<?ifdef $(var.MyVar)?>

<!-some code -->

<?endif?>

 

If I change the 'ifdef' to 'ifndef' the code given in the if block
executes. That means the preprocessor is working fine, but it is not
able to see the variables as defined. What could be the problem? Any
missing reference or file? 

 

Please point out any reasons which could cause this kind of problem.

 

Thanks and Regards,

Sameeksha

DISCLAIMER ========== This e-mail may contain privileged and
confidential information which is the property of Persistent Systems
Pvt. Ltd. It is intended only for the use of the individual or entity to
which it is addressed. If you are not the intended recipient, you are
not authorized to read, retain, copy, print, distribute or use this
message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems
Pvt. Ltd. does not accept any liability for virus infected mails.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to