Page 1 of 1

get/display permanently stored variables?

Posted: 03 Aug 2011 14:58
by taripo
How do I get/display a permanently stored environment variable?

Re: get/display permanently stored variables?

Posted: 03 Aug 2011 16:46
by Ed Dyreen
'
I don't understand, I think

Code: Select all

set

Re: get/display permanently stored variables?

Posted: 03 Aug 2011 17:35
by taripo
no cos as an example, if you permanently set an environment variable, so, you use setx or the GUI, then run set to display them, it isn't changed for the "session" yet, whereas if you opened a new command prompt, then it'd be loaded into the session.

I want a way to do like a 'set', that displays the permanent ones. not the current ones.

just like setx sets permanent ones, and one would have to do set afterwards to get them set for the current session, or load a new cmd prompt. So there is a distinction there.

Re: get/display permanently stored variables?

Posted: 03 Aug 2011 18:07
by Ed Dyreen
'
Ah yes, I suspected this is what you were after :)

Code: Select all

:: use to create environment variable
::(
   HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
::)

This is where XP stores it's permanent variables,
You enumerate RegPath and you'll get the permanent variables.

see reg query /? for help.