A funny question.

  • Thread starter Thread starter popo
  • Start date Start date
P

popo

I often meet something like
'%SystemRoot%',%UserProfile%,%ProgrameFiles%,'AllUsersProfile',
'%WinDir%' in the registry.I want to know what is the official name of
them,is it 'Environment Variable'? And I'm wondering why they are named by a
format '%...%'.Could someone tell me the answer? And is there some more '%%'
besides the above?

Thank you very much.
I appreciate any constructive words.
 
From a command prompt;
set
to see what the environment variables resolve to. The %% signs tell the
command interpreter and or the operating system to treat them as variables.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


:
|I often meet something like
| '%SystemRoot%',%UserProfile%,%ProgrameFiles%,'AllUsersProfile',
| '%WinDir%' in the registry.I want to know what is the official name of
| them,is it 'Environment Variable'? And I'm wondering why they are named by
a
| format '%...%'.Could someone tell me the answer? And is there some more
'%%'
| besides the above?
|
| Thank you very much.
| I appreciate any constructive words.
|
|
 
From a command prompt;
set
to see what the environment variables resolve to. The %% signs tell the
command interpreter and or the operating system to treat them as variables.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


:
|I often meet something like
| '%SystemRoot%',%UserProfile%,%ProgrameFiles%,'AllUsersProfile',
| '%WinDir%' in the registry.I want to know what is the official name of
| them,is it 'Environment Variable'? And I'm wondering why they are named by
a
| format '%...%'.Could someone tell me the answer? And is there some more
'%%'
| besides the above?
|
| Thank you very much.
| I appreciate any constructive words.
|
|
 
I run set,and the result is:
ALLUSERSPROFILE=H:\Documents and Settings\All Users
APPDATA=H:\Documents and Settings\Administrator\Application Data
CLIENTNAME=Console
CommonProgramFiles=H:\Program Files\Common Files
COMPUTERNAME=IAMPOPO
ComSpec=H:\WINDOWS\system32\cmd.exe
HOMEDRIVE=H:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\IAMPOPO
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=H:\WINDOWS\system32;H:\WINDOWS;H:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0806
ProgramFiles=H:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=H:
SystemRoot=H:\WINDOWS
TEMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
USERDOMAIN=IAMPOPO
USERNAME=popo
USERPROFILE=H:\Documents and Settings\Administrator
windir=H:\WINDOWS
"Dave Patrick" <[email protected]>
 
I run set,and the result is:
ALLUSERSPROFILE=H:\Documents and Settings\All Users
APPDATA=H:\Documents and Settings\Administrator\Application Data
CLIENTNAME=Console
CommonProgramFiles=H:\Program Files\Common Files
COMPUTERNAME=IAMPOPO
ComSpec=H:\WINDOWS\system32\cmd.exe
HOMEDRIVE=H:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\IAMPOPO
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=H:\WINDOWS\system32;H:\WINDOWS;H:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0806
ProgramFiles=H:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=H:
SystemRoot=H:\WINDOWS
TEMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
USERDOMAIN=IAMPOPO
USERNAME=popo
USERPROFILE=H:\Documents and Settings\Administrator
windir=H:\WINDOWS
"Dave Patrick" <[email protected]>
 
In the registry these environement strings are expand to what every they are
on the local machine and user. That is why they are stored in a
reg_expand_sz instead of a reg_sz
 
In the registry these environement strings are expand to what every they are
on the local machine and user. That is why they are stored in a
reg_expand_sz instead of a reg_sz
 
Back
Top