You can set the environment variable ProcessStartInfo.EnvironmentVariables , so if you can find a way to get them in advance, you wonβt be able to exchange environments.
I am not in the IDE, so I canβt confirm, but you can use this method after the fact (although I doubt it).
You can also have a parent process in a script package and parse the output.
master.exe set
source share