Add to My Yahoo! | Google Reader or Homepage | Add to Windows Live | Add to Windows Live Alerts

Wictor Wilén

SharePoint Server MVP / Author / MCT / MCTS / MCP / MSc writing about SharePoint and other interesting Microsoft technologies

WIX - accessing properties in script CustomActions

Posted at 2006-04-20 01:49 by Wictor Wilén in WiX with 3 comments.
My last post showed how to use VBScript functions as CustomActions. More than often you need to access some of the properties you have defined in your WIX files, for example an installation directory, a connection string etc.

To access these properties just use the Session object and it's a Property property.

Here's an example with two properties used:
set adam = GetObject(Session.Property("ADSERVER") & "/" & Session.Property("ADSPATH"))

The WIX file should contain two properties:
<Property Id="ADSERVER" Admin="yes" >LDAP://server</Property>
<Property Id="ADSPATH" Admin="yes" ></Property>


The Property property is read/write so you can manipulate the properties within your code.

Comments and trackbacks

#  Interesting Finds by Trackback
Screenshot from websnpr
#  Writing Session.Property from Script by WIX Noob
Screenshot from websnpr I now your post is now over 2 years old. But have you had success writing to Session.Property from your code? ie. Set Session.Property("SOMEPROP") := 5
#  Re: Writing Session.Property from Script by Wictor Wilén
Screenshot from websnpr Heya, I've had no problems with that. Why do you use := instead of =?
Make a comment on this post:
Subject:  

Your name:  
Your Url:  
Note: submissions may have to be approved before being visible, so don't submit your comment multiple times.
Real Time Web Analytics