Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

XP SETX Utility set global environment variable


(!)

ComputerMuse's Avatar
ComputerMuse ComputerMuse is offline
Computer Specs
Junior Member with 1 posts.
THREAD STARTER
 
Join Date: Dec 2011
Location: South Florida
Experience: Advanced
01-Dec-2011, 11:41 AM #1
Thumbs up XP SETX Utility set global environment variable
i saw this link for questions on the setx command. Having just worked that out myself, i thought that i would share what i have learned. The OP has over 15,000 views at time of this writing, so there is much interest in this command and how it works.

the first question about rebooting, no it is not necessary to reboot. it just has to do with an understanding of what the setx command is doing at runtime. by running setx variablename path, what you are doing is setting a global environment variable for all future dos windows but not the current one!

The solution for bobritter is to run the following command at runtime: setx variablename path & set variablename=path. An example might be: setx returnvalue %cd% & set returnvalue=%cd%

What this is doing is setting (via setx) all future environment variables as well as the local (via the set command) one too. This should fix the rebooting issue as well as answer squashman as to what the command is doing.

The setx command does lots of other things, type in setx by itself to display the help menu.

Hope that this helps out other users of this command. If anyone has other questions about this command, please ask away...

CM

Last edited by ComputerMuse; 01-Dec-2011 at 11:42 AM.. Reason: mod the title
Squashman's Avatar
Trusted Advisor with 19,645 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
01-Dec-2011, 11:57 AM #2
Good job digging up a 4 1/2 year old thread. Of course it is going to have over 15,000 views after that amount of time. Half of those are probably just from Google Indexing this site a couple of times a day.

I did not question as to what the command was doing. I just didn't know SETx was a command. It is not native to XP itself until you install the Support Tools. I don't know too many people who bother to install the support tools.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
dos, set, setx

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑