Re: Environment variables defined using My Computer Properties
- From: "David H. Lipman" <DLipman~nospam~@Verizon.Net>
- Date: Wed, 31 Aug 2005 14:53:20 -0400
From: "David Candy" <.>
| No it's not. It is in memory. You are confusing storage with the environment. And the
| registry is not the only place the the evironment is stored, only part of it is stored
| there.
|
| When you logon your environment is made from the the registry and autoexec.bat (and
| autoexec.nt/config.nt for 16 bit programs). Each program that is started gets it's own
| copy of the environment FROM the program that started it, usually explorer but may not be.
|
| This is what CreateProcess (the thing that executes programs on windows) has to say
|
| lpEnvironment
| [in] Pointer to an environment block for the new process. If this parameter is NULL, the
| new process uses the environment of the calling process. An environment block consists of
| a null-terminated block of null-terminated strings. Each string is in the form:
|
| name=value Because the equal sign is used as a separator, it must not be used in the name
| of an environment variable.
|
| An environment block can contain either Unicode or ANSI characters. If the environment
| block pointed to by lpEnvironment contains Unicode characters, be sure that
| dwCreationFlags includes CREATE_UNICODE_ENVIRONMENT.
|
| Note that an ANSI environment block is terminated by two zero bytes: one for the last
string,
| one more to terminate the block. A Unicode environment block is terminated by four zero
bytes:
| two for the last string, two more to terminate the block.
|
| Here is the environment lifted from a memory block (I got bored reformatting it - but
| here's enough to show that it is NOT in alphabetical order, though it appears to be in
| alpha order by where it came from).
|
| COMSPEC=C:\WINDOWS\SYSTEM32\COMMAND.COM
| ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
| APPDATA=C:\DOCUME~1\DAVIDC~1\APPLIC~1
| COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
| COMPUTERNAME=SERENITY
| FP_NO_HOST_CHECK=NO
| HOMEDRIVE=C:
| HOMEPATH=\Documents and Settings\David Candy
| LOGONSERVER=\\SERENITY
| NUMBER_OF_PROCESSORS=1
| OS=Windows_NT
| PATH=C:\PROGRA~1\WINDOW~4\Tools\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C
| :\PROGRA~1\SUPPOR~1\;c:\msbob;C:\MSBOB\;
| PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86
| PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel.PROCESSOR_LEVEL=15
| PROCESSOR_REVISION=0207
| PROGRAMFILES=C:\PROGRA~1
| PROMPT=$P$G
| SESSIONNAME=Console.SYSTEM
| DRIVE=C:
| SYSTEMROOT=C:\windows
| TEMP=C:\windows\T
|
| --
| ------------------------------------------------------------------------------------------
| http://webdiary.smh.com.au/archives/_comment/001075.html
| =================================================
| "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
news:eQjYTjjrFHA.464@xxxxxxxxxxxxxxxxxxxxxxx
>> From: "David Candy" <.>
>>
|>> I doubt the environment is in the registry (of course some of it is stored there but
|>> each program gets a copy of the environment and it's a memory thing). I suspect it IS
|>> stored alphabetically in memory (I went looking for a debugger to confirm but it's
|>> not installed).
|>>
|>> --
Processing and displaying are two different things.
We haven't even gotten into the Environmental variables that are usable, not in the
Registry, and are not displayed.
--
Dave
http://www.claymania.com/removal-trojan-adware.html
http://www.ik-cs.com/got-a-virus.htm
.
- Prev by Date: Re: PROBLEM INSTALLING XP & PARTITIONING IN SETUP
- Next by Date: Re: high spike in memory numbers
- Previous by thread: Software Downloads
- Next by thread: Computer Keeps Shutting Down Unexpectedly
- Index(es):
Relevant Pages
|