Hi, i need to change the "PATH" environment variable in a VB program (Visual Studio 2008). Here is the code i use to add the "C:\TEST\" folder at the end of the existing one.
test Code:
Dim PathVal As String PathVal = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User) Environment.SetEnvironmentVariable("Path", PathVal & ";C:\TEST\", EnvironmentVariableTarget.User)
It work great under Windows XP but under Vista it did'nt work at all (even when running as a administrator).
How can i change the "PATH" under Vista?
Thanks in advance...




Reply With Quote