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
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
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.
Summary: Is it possible to use user/system environment variables in VB? I'm integrating a batch file into a VB program. The batch is writing to: %temp%\tmp.tmp so I'm wondering if there's a way I can open that...
Summary: How do I set environment variables in VB.NET? I tried shelling out -> set myvar="myval" But that doesn't work. I know Environ("myvar") gets the value, but what sets it? thanks ...
Summary: I need some help with programmatically setting environment variables using C#. I can obtain them easily using System.Environment...but how can I write them? TIA, Chi They mostly come at night...mostl...