title: Access MSI properties from within an installer helper class
body: <p>I have a which extends System.Configuration.Install.Installer, which is run during install time of our application. I need to access some properties that are set in the MSI file (e.g. INSTALLDIR, and some other paths I need to retrieve). Is there a way to access MSI properties from within a helper assembly?</p>
  
  <p>It may be worthy to note that our installer is built using WiX 3.5.</p>
  
  <p>Thanks in advance for any assistance on this.</p>
  
  <p><strong>EDIT</strong> Here is our current code in the class. </p>
  
  <pre><code>[RunInstaller(true)]
     public class MxServeInstaller : Installer
     {
        private ServiceInstaller myServiceInstaller;
        private ServiceProcessInstaller myServiceProcessInstaller;
  
        public MyProductInstaller()
        {
           this.myServiceInstaller = new ServiceInstaller();
           this.myServiceInstaller.StartType = ServiceStartMode.Automatic;
           this.myServiceInstaller.ServiceName = MyProduct.SERVICE_NAME;
           this.myServiceInstaller.Description = "Provides software copy protection and token pool management services for the Mx-Suite from Company";
           this.myServiceInstaller.ServicesDependedOn = new string[] { "Crypkey License" };
  
           Installers.Add(this.myServiceInstaller);
  
           this.myServiceProcessInstaller = new ServiceProcessInstaller();
           this.myServiceProcessInstaller.Account = ServiceAccount.LocalSystem;         
           Installers.Add(this.myServiceProcessInstaller);
        }
  
        public override void Install(System.Collections.IDictionary stateSaver)
        {
           base.Install(stateSaver);
           ServiceController controller = new ServiceController(MyProduct.SERVICE_NAME);
           try
           {
              controller.Start();
           }
           catch( Exception ex )
           {
              string source = "My-Product Installer";
              string log = "Application";
              if (!EventLog.SourceExists(source))
                 EventLog.CreateEventSource(source, log);
  
              EventLog eventLog = new EventLog();
              eventLog.Source = source;
              eventLog.WriteEntry(string.Format("Failed to start My-Product!{1}", ex.Message), EventLogEntryType.Error);
           }
        }
     }
  </code></pre>
  
  <p>What I plan on adding is a phase for AfterInstall, which at the very least needs to know the INSTALLDIR property set in the installer.</p>