How to make a program to have its own version of PATH env
I want to know if I can开发者_JAVA百科 have custom version of PATH env variable specific to my executable?
Use Environment.GetEnvironmentVariable() and Environment.SetEnvironmentVariable() to get and set PATH from within your program.
Can you wrap your executable in a script (batch file), that would to two things: (1) set the PATH; (2) invoke the original executable?
精彩评论