get/display permanently stored variables?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
taripo
Posts: 228
Joined: 01 Aug 2011 13:48

get/display permanently stored variables?

#1 Post by taripo » 03 Aug 2011 14:58

How do I get/display a permanently stored environment variable?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: get/display permanently stored variables?

#2 Post by Ed Dyreen » 03 Aug 2011 16:46

'
I don't understand, I think

Code: Select all

set

taripo
Posts: 228
Joined: 01 Aug 2011 13:48

Re: get/display permanently stored variables?

#3 Post by taripo » 03 Aug 2011 17:35

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.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: get/display permanently stored variables?

#4 Post by Ed Dyreen » 03 Aug 2011 18:07

'
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.
Last edited by Ed Dyreen on 03 Aug 2011 18:14, edited 1 time in total.

Post Reply