Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messing with environment variable

Status
Not open for further replies.

FORAND

Programmer
May 26, 2003
64
CA

How can i :

Change a system (or user) environment variable (on NT) and use that variable in my program ?

Do I have to close and re-open my program to do so?? ?

Please help, i'm desperate....

 
You can set the env. var. in controlpanel / system (If I remember right), and read the variable in processes (your programs) *created* after this.

Use getenv() to read the variable.

/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top