I created an installer using WiX. One thing the installer does is sets an environment variable PLUGIN_DIRECTORY (it's at the system level).
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:
FileSystemWatcher water = new FileSystemWatcher();
watcher.Path = Environment.GetEnvironmentVariable("PLUGIN_DIRECTORY") + "\\";
Unfortunately (and when I debug), all that watcher.Path is set to is "\".
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.
Thanks