Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

How Do I Turn A Normal Variable Into A Enviromental Variable?

Hey guys i need help this time i need help on how to turn a normal variable into a enviromental variable?
Why do you need to use an environment variable? Generally speaking, that's for something making permanent changes to a system, such as adding a directory to the %path% variable.
White Light, the reason is because i am curious and keen to learn and know so please tell me.
I guess you could change an existing environmental variable by simply using the set command.. "Set PATH=%PATH%;%location_to_add%".

But, I'm not sure how one would set an environmental variable. Brb google.

Edit: try "setx /?"
I have no fucking clue.
Syntax for standard usage is as follows:

Defining an environment variable in the local user's environment:
Code
SETX <variable> <value>
SETX myname Greenp0ins

Defining an environment variable in the global environment:
Code
SETX <variable> <value> /M
SETX myname Greenp0ions /M

That should help.
[Image: gaqzA.png]
Hey GreenPosion thanks now i know how to set a normal variable as a enviromental variable! Thanks as well GTX!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by gurlhackerclubApr 25, 2020 12:29 AM 12 210 Apr 25, 2020 12:29 AM
Last Post: dracx
[Shell] by DoxinYourBotnetM8Mar 19, 2015 06:23 PM 21 394 Mar 19, 2015 06:23 PM
Last Post: Nakamoto.
[Shell] by Topkek_Is_LifeDec 9, 2014 09:15 PM 2 117 Dec 9, 2014 09:15 PM
Last Post: White Light