Click here to get back home

How To Get Username and Domain Name in Windows 2003?

 HomeNewsGroups | Search

microsoft.public.windows.server.security - Supporting MS Windows network? Read here before it's too late! 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How To Get Username and Domain Name in Windows 2003? Will 06-10-2005
Posted by Will on June 10, 2005, 5:03 pm
Please log in for more thread options
Under Windows 2000, a batch file or VB program can use environment variables
UserName and UserDomain to get informal credentials of the current logged on
user. Under Windows 2003, these environment variables do not appear to
exist. What is the approved method for obtaining this information under
Windows 2003?

--
Will
Internet: westes AT earthbroadcast.com





Posted by Jeff Cochran on June 11, 2005, 2:07 pm
Please log in for more thread options
On Fri, 10 Jun 2005 17:03:13 -0700, "Will"

show/hide quoted text

How would you like to? :)

A common method is to use the WSH Network Object:

http://www.devguru.com/Technologies/wsh/quickref/wshnetwork.html

Jeff


Posted by Roger Abell on June 13, 2005, 12:34 am
Please log in for more thread options
??? ! ?
Those env vars exist for me !!

--
Roger Abell
Microsoft MVP (Windows Security)

show/hide quoted text
variables
show/hide quoted text
on
show/hide quoted text




Posted by Will on June 13, 2005, 4:14 pm
Please log in for more thread options
Interesting, I wonder what happened to turn mine off under just Windows
2003.

--
Will
Internet: westes AT earthbroadcast.com


show/hide quoted text




Posted by Roger Abell on June 14, 2005, 8:22 am
Please log in for more thread options
Yes, indeed.
I am unsure how you are attempting access to the env vars, but are
you sure you are accessing the system vars instead of only the user
env vars? If you open a cmd prompt and enter "set" do they not
show as set with expected values ?

--
Roger Abell
Microsoft MVP (Windows Security)

show/hide quoted text




Similar ThreadsPosted
how i can let one Username logon to domain? April 21, 2006, 5:08 pm
Windows 2003 - Child domain cannot request certificate from root domain January 11, 2008, 11:41 am
Windows 2000 Domain, Windows 2003 Enterprise CA July 15, 2005, 2:07 pm
Windows 2008 CA in a Windows 2003 domain July 31, 2009, 8:06 am
Windows 2003 Domain Security July 14, 2005, 11:06 am
Windows 2003 domain password policy September 26, 2006, 9:53 pm
Demote first DC in a Windows 2003 domain. What happens to the certs? March 3, 2008, 10:43 pm
Is it possible to remove an Enterprise CA from a Windows 2003 R2 domain? July 20, 2008, 1:08 am
Windows 2003 Domain Controller (Open Port 593) December 18, 2006, 4:48 pm
How does domain isolation with Windows 2003 IPsec happen? October 29, 2008, 1:06 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy