Try <?ifdef MyEnvVar ?> instead.
 
-Brian Simoneau

        -----Original Message-----
        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Afshin
Sepehri
        Sent: Monday, June 25, 2007 1:51 PM
        To: wix-users@lists.sourceforge.net
        Subject: [WiX-users] Checking if an enivronment variable is
defined
        
        

        Hi,

         

        In my wix file, I cannot check if an environment variable is
defined. The following code does not work. The ifdef statement never
returns TRUE even when the environment variable is defined and I can use
its value in my code.

         

        <?ifdef $(env.MyEnvVar) ?>

              <?define MyVar = $(env.MyEnvVar) ?>

        <?else?>

              <?define MyVar = "MyDefaultValue" ?>

        <?endif?>

         

        As it is clear from the code, I want to use this code to assign
some default value to a variable if an environment variable is not
defined. Is there any way to do that?

         

        Thanks,

        Afshin

         

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to