title: Can't Access Windows Environment Variable with C#
body: <p>I created an installer using WiX.  One thing the installer does is sets an environment variable PLUGIN_DIRECTORY (it's at the system level).</p>
  
  <p>Within some C# code that I have written, I need to access that variable so I can watch a certain directory.  I do this via the following code:</p>
  
  <pre><code>FileSystemWatcher water = new FileSystemWatcher();
  watcher.Path = Environment.GetEnvironmentVariable("PLUGIN_DIRECTORY") + "\\";
  </code></pre>
  
  <p>Unfortunately (and when I debug), all that watcher.Path is set to is "\".</p>
  
  <p>Do I need to reboot after the install?  I wouldn't see why as the variable is already set.  Any other suggestions?  I'm not getting any errors - it's just not watching the right path.</p>
  
  <p>Thanks</p>