Adding to the PATH variable

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?
 
S

Shiva

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top