"Peter Jaworski" <[EMAIL PROTECTED]> writes:

> or it is enough to to just use:
>
> <Property Id="MyProperty">
> [%myenvironmentvariable]
> </Property>?

Windows Installer would not expand that environment variable,
because the Property.Value column has type Text rather than
Formatted.  http://msdn2.microsoft.com/library/aa370908.aspx

Instead, you can use custom action type 51 to assign the value to
the property.  http://msdn2.microsoft.com/library/aa368237.aspx

In WiX, it would go like this, IIRC:

<CustomAction Id="SetMyProperty" Property="MyProperty"
              Value="[%myenvironmentvariable]"/>
<InstallUISequence>
  <Custom Action="SetMyProperty" Before="AppSearch"/>
</InstallUISequence>
<InstallExecuteSequence>
  <Custom Action="SetMyProperty" Before="AppSearch"/>
</InstallExecuteSequence>

Repeat for the other sequences if appropriate.  Also heed the
advice to add a prefix to the names of your custom properties and
actions.  http://msdn2.microsoft.com/library/aa370529.aspx

Attachment: pgpwHI99xZi4a.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to