title: How can I manage MSI session state within Javascript Custom Actions?
body: <p>I have an ISAPI DLL, an add-on to IIS.  I build the installer for it using WIX 3.0.  </p>
  
  <p>In the installer project, I have a number of custom actions implemented in Javascript.  One of them, run at the initiation of the install, stops any IIS websites that are running.  Another starts the IIS websites at the end of the install. 
  This stuff works, the CA's get invoked at the right times and under the right conditions.  but the logic is naive.  It stops all websites in the beginning (even if they are already stopped) and starts all websites at the end (even if they were previously stopped). This is obviously wrong.    </p>
  
  <p>What I'd like to do is keep track in the session of which websites required a stop at the beginning, and then, at the end, only try to restart those websites. Getting the state of a website is easy using the <a href="http://msdn.microsoft.com/en-us/library/ms524905.aspx" rel="nofollow">ServerState property</a> on the CIM object.  The question I have is, how should I store this information in the MSI session? </p>
  
  <p>It's easy to stuff a single piece of information into a <a href="http://msdn.microsoft.com/en-us/library/aa371681%28v=VS.85%29.aspx" rel="nofollow">session Property</a>, but what's the best way to store a set of N pieces of information, one for each website?  In some cases there can be 1 website, in some cases, 51 websites. </p>
  
  <p>I suppose I could use each distinct website name to create a distinct property name. Just not sure that is the best, most-efficient, most efficacious way to do things.  Also, is it legal to use slashes in the name of an MSI Session property? (the website names will have slashes in them)  </p>
  
  <p>Suggestions? </p>