From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: Odp: User login name ? Date: Sat, 22 Jul 2000 11:55:22 +0100 Organization: Customer of Planet Online Lines: 48 Message-ID: <39797D9A.9A63DBC8@phekda.freeserve.co.uk> References: <8l28aa$h49$1 AT plato DOT wadham DOT ox DOT ac DOT uk> NNTP-Posting-Host: modem-51.sodium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news5.svr.pol.co.uk 964285265 3285 62.136.10.51 (22 Jul 2000 17:01:05 GMT) NNTP-Posting-Date: 22 Jul 2000 17:01:05 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. Piotr Eljasiak wrote: > > > The environment variable USERNAME is, I think, set by NT: I don't have > > WinXX to hand. If you can access environment variables, you can access > > that one. [snip] > This way it'll work under NT, but what about WinXX ? It will work under Windows 2000 too. Here's a list of environment variables that were set on a Win2k Advanced Server box: ALLUSERSPROFILE=D:\Documents and Settings\All Users APPDATA=D:\Documents and Settings\Administrator\Application Data CommonProgramFiles=D:\Program Files\Common Files COMPUTERNAME=CAWINTOOK-COMPU ComSpec=D:\WINNT\system32\cmd.exe HOMEDRIVE=D: HOMEPATH=\ LOGONSERVER=\\CAWINTOOK-COMPU NUMBER_OF_PROCESSORS=1 OS=Windows_NT Os2LibPath=D:\WINNT\system32\os2\dll; Path=D:\WINNT\system32;D:\WINNT;D:\WINNT\System32\Wbem;D:\Program Files\Support Tools\;C:\READIBMW PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 6 Model 1 Stepping 9, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0109 ProgramFiles=D:\Program Files PROMPT=$P$G SystemDrive=D: SystemRoot=D:\WINNT TEMP=D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp TMP=D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp USERDNSDOMAIN=[!!! removed, but of form "some.host.org" !!!] USERDOMAIN=CAWINTOOK_DOM USERNAME=Administrator USERPROFILE=D:\Documents and Settings\Administrator windir=D:\WINNT Bye, -- Richard Dawe [ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]