Computing.Net > Forums > Programming > setting environment variables in vb

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

setting environment variables in vb

Reply to Message Icon

Name: aslogar
Date: August 4, 2005 at 08:38:41 Pacific
OS: xp
CPU/Ram: intel
Comment:

Is there a way to set system environment variables in vb.
I see the class environ to view them, but what if I want to set them?
thanks,
Alex



Sponsored Link
Ads by Google

Response Number 1
Name: ntengineer
Date: August 4, 2005 at 17:37:32 Pacific
Reply:

Environment Variables are stored in the registry, so you can save them there. But any currently running process won't see it. Also, any child process of a currently running process won't see it. But new processes will.


0

Response Number 2
Name: borelli35
Date: August 11, 2005 at 18:10:55 Pacific
Reply:

I forget the specific call for this function but whatever function (exec()?) you can call command.com with you can call a string of set assignments with too.

John W. Borelli
IT Specialist
Hawkeye Security

Link to my email address


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: setting environment variables in vb

System Environment Variables in VB www.computing.net/answers/programming/system-environment-variables-in-vb/12819.html

VB.NET and Environment Variables www.computing.net/answers/programming/vbnet-and-environment-variables/9708.html

Environment Variables in C# www.computing.net/answers/programming/environment-variables-in-c/13393.html