Adding to the PATH variable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I remember setting the PATH environment variable from years back, but haven't
touched it since win95 days. Now i have to add a couple of lines to it using
vb.net so that a console app will work properly.

I've read that at the moment you can only get environment variables, and
that vb.net 2005 will allow you to set them.

Does anyone know how to add to the PATH variable using vb.net 2003?
 
Hi,

Option 1: Make entries into the registry directly. For user-specific env
variables: HKEY_CURRENT_USER\Environment For system-wide env variables:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment

Option 2: Use Win32 API SetEnvironmentVariable()

I remember setting the PATH environment variable from years back, but
haven't
touched it since win95 days. Now i have to add a couple of lines to it
using
vb.net so that a console app will work properly.

I've read that at the moment you can only get environment variables, and
that vb.net 2005 will allow you to set them.

Does anyone know how to add to the PATH variable using vb.net 2003?
 
Back
Top