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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Environment variables - refresh ?? Command line remove?

Status
Not open for further replies.

mchoss

Programmer
Feb 11, 2002
87
GB
Win 2000 workstation

1 - I added an environment variable and my application was able to read it perfectly well.

2 - I changed the variable under system > advanced > environment variables ... and the app did not register this change, even after restarting the app.

3 - I used the SET command on the command line and true enough, DOS told me that the value for my environment variable was still set to the old value.

Question1 - How do i resolve this discrepancy? I had been under the impression that if you changed the environment variables on the system > advanced > environment variables tab that the change was immediate.

Question2 - Is there a way of refreshing the variables held in system memory to overcome this problem?

Question3 - What command do i use to remove (not just reset) an environment variable on the command line? Again, i have removed it under the control panel but the SET command on the command line shows it still there.

Much appreciated

 
1 - You need to reboot for it to take effect.
2 - Dunno.
3 - SET <variable>= <-- that's a blank
 
1 - I was afraid that would be the response. I knew that would work, but was looking for a way to avoid this. Ah well.

2 - Fair enough

3 - I was looking for a way to actually remove the damn thing as i have somehow managed to create a few similar variables with different cases that according to dos have different values stored, so i could really do with removing some of the entirely to avoid confusion.

Cheers
 
THe SET <variable>= will remove them completely.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top