I have some packages in a Folder on Azure and I want to add that path to the VM's %PATH% system variable which I have to do programmatically in order for my code to be able to use those packages. I have done adding the Folder path to the %PATH% variable using POWERSHELL commands but the problem is when you edit %PATH% you have to restart the process in order for the process to acquire the new %PATH%.
Now as I am on Azure Web Role, how do I deal with it ? Should I restart/recycle my web role using:
RoleEnvironment.RequestRecycle();
But this way the POWERSHELL script will run again and reset the %PATH% ?? Is there any other way to add a folder's path to %PATH% variable and the process uses it without having the need to restart/recycle ??
p.s. I have already tried the set/setx commands. "setx" does require the restarting and "set" just sets the path for that current session so both don't work for me.