A funny question.

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.
 
D

Dave Patrick

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.
|
|
 
D

Dave Patrick

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.
|
|
 
P

popo

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]>
 
P

popo

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]>
 
R

Richard McCall [MSFT]

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
 
R

Richard McCall [MSFT]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top