$(...) variables are evaluated at build-time by the preprocessor.
For a run-time check, you want something like:

<Condition Message="Test must be set."><![CDATA[ 
    [%testdir] <> "" 
]]></Condition>

http://msdn.microsoft.com/en-us/library/aa368012%28v=VS.85%29.aspx


-----Original Message-----
From: Christoph Goetz [mailto:christoph.go...@giepa.de] 
Sent: 18 July 2011 08:45
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] Problems with the environment variable

Sorry....

-----Ursprüngliche Nachricht-----
Von: Christoph Goetz [mailto:christoph.go...@giepa.de] 
Gesendet: Montag, 18. Juli 2011 09:42
An: 'General discussion for Windows Installer XML toolset.'
Betreff: Re: [WiX-users] DTE OutputFileName vs OutputName - possible wix
bug?

Hi,
my installation should only start if an environment variable is set.
But my installation start every time? 
I just want to check if the environment is set and not if it is set to an
specific value.

For example:

  
    
  <?if $(env.testdir)?>
    
    <Directory Id="TARGETDIR" Name="SourceDir">
  
 
     <Directory Id="ProgramFiles64Folder">
        <Directory Id="INSTALLDIR"
                   Name="Test "/>     
      

 ...   
    
   
                <Feature Id="ProductFeature" 
             Title="test" 
             Level="1"
         
...

   <?else?>    
    <?error Test must be set!?>    
   <?endif?>

Christoph



----------------------------------------------------------------------------
--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users




-----------------------------------------------------------------------------
-
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to