To define pre-processor variables (equivelant to -d passed to Candle.exe) use
<?define MyVar="foo.exe" ?> Cheers Russell On 24 Jul 2009, at 19:47, jo...@msli.com wrote: > I have been struggling to find one simple example of defining a > preprocessor variable in the wxs file. > > Currently, If I Append this to my candle command line: > -dMyVar='foo.exe' > then references to $(var.MyVar) in wxs work. > But no matter how I define MyVar in the main wxs, they are not found. > > Why does this not work, defined in my main project wxs? > <WixVariable Id='MyVar' Value='foo.exe' /> > > > Until that works, I can't hope to reach my goal of using an > environment > variable (ExeName): > <?ifdef $(env.ExeName) ?> > <WixVariable Id='MyVar' Value="$(env.ExeName)" /> > <?else?> > <WixVariable Id='MyVar' Value='foo.exe' /> > <?endif?> > > > CONFIDENTIALITY NOTICE: This electronic mail message and any > attachment hereto may contain confidential information of Meyer > Sound Laboratories, Incorporated and is intended for the personal > and confidential use of the designated recipient(s) only. If you > are not the intended recipient (or responsible for delivering the > message to the intended recipient), you have received this message > in error and any review, distribution, or copying of this message or > any attachment hereto is prohibited. If you have received this > message in error, please promptly notify the sender and permanently > delete it from your computer. > > ------------------------------------------------------------------------------ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users