You're right, [%USERPROFILE] was being used in the standard Property
which accepts non-formatted values.

I have that working with SetProperty which fits the bill perfectly.

Thanks for the guidance, I appreciate the help.

Lionel


-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com] 
Sent: 11 August 2010 17:23
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Environment variables into a WIX property

[%Environment_Variable] is only valid in fields of the Formatted type as
the link I pasted shows.

Make sure you're using it in a field which is of Formatted type. It
sounds like you're not in which case you can't use that code as any
Property wouldn't expand to the actual text contained within the
Property. Test it with something like

<Property Id="MYTESTPROPERTY" Value="C:\TEMP" />

& use [MYTESTPROPERTY] instead of [%USERPROFILE]. If I'm correct & the
field isn't Formatted that will fail with the same error as before. The
only field in the Control table which is of Formatted type is the Text
field -> http://msdn.microsoft.com/library/aa368044.aspx Pop your built
MSI open using Orca/InstEd & double check your code is in that field. If
it's not then that's where your problem lies.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Lobo, Lionel [mailto:lionel.l...@daon.com] 
Sent: 11 August 2010 16:55
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Environment variables into a WIX property

I had tried that, the installer fails with the message:

"The specified path [%USERPROFILE] is unavailable."

I should add that this property is being used to initialize a custom
folder selector screen with DirectoryCombo/DirectoryList/PathEdit
controls.

This would allow the user to have the default of creating a custom
folder in the USERPROFILE, or to select a different one.

The selected folder, as reflected in the property, is then created by
the installer.

Thanks,
Lionel


-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 11 August 2010 16:36
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Environment variables into a WIX property

Simply use [%Environment_Variable] as a Property. See ->
http://msdn.microsoft.com/en-us/library/aa368609.aspx

Palbinder Sandher
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500
F: +44 (0) 141 945 8501 

http://www.iesve.com
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP Email Disclaimer

-----Original Message-----
From: Lobo, Lionel [mailto:lionel.l...@daon.com]
Sent: 11 August 2010 16:29
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Environment variables into a WIX property

Hi,

 

Is there a way to get an environment variable into a WIX property?

 

I'm trying to get the USERPROFILE with:

 

<Property Id="UserFolder"  Value="$(env.USERPROFILE)\MyApp\MyFolder"/>

 

But this only picks up the USERPROFILE of the build machine, where the
installer is built.

 

I want it to use the USERPROFILE of the machine where the app is being
installed. 

 

Would I need to write an extension to do this?

 

Any suggestions would be appreciated.

 

Thanks,

Lionel

 

------------------------------------------------------------------------
------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------
------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------
------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to