I created the installer using WiX. One thing the installer does is set the PLUGIN_DIRECTORY environment variable (it is at the system level).
Inside some C # code that I wrote, I need to access this variable so that I can look at a specific directory. I do this through the following code:
FileSystemWatcher water = new FileSystemWatcher();
watcher.Path = Environment.GetEnvironmentVariable("PLUGIN_DIRECTORY") + "\\";
Unfortunately (and when I am debugging), everything watcher.Path is set to "\".
Do I need to reboot after installation? I would not understand why, since the variable is already set. Any other suggestions? I don't get any errors - it just doesn't look the right way.
thanks
source
share