Something like this should do it:

<!-- If Var1 not defined use preset value -->
<?ifndef Var1?>
  <?define Var1 = "Value1"?>
<?endif ?>

Neil

-----Original Message-----
From: Joe Osman [mailto:joe.os...@tait.co.nz] 
Sent: 19 January 2010 03:05
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to assign a default value to preprocessor
properties

I am using preprocessor properties in my WIX project and I assign them
values in msbuild when building the WIX project from the command line .
For example I have the following preprocessor properties: 
Var1=$(Var1);Var2=$(Var2)
I assign them values in msbuild in this way: msbuild
/p:Var1="value1";Var2="value2"

The problem is that when I build the project in Visual Studio those
properties get an empty value. I want to give these properties a default
value so that I will be able to build the WIX project from Visual Studio
and not just from the command line using msbuild.

Is there any way to assign these properties a default value that can be
overridden by msbuild ?

Thanks for your help !

=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be the
subject of legal or other privilege, none of which is waived or lost by
reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no other
act on the email.
Unfortunately, we cannot warrant that the email has not been  altered or
corrupted during transmission.
=======================================================================


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to