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:
  1. Dim PathVal As String
  2.  
  3. PathVal = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)
  4. 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...