Link to home
Start Free TrialLog in
Avatar of snapdrag0n420
snapdrag0n420

asked on

capturing NT UserName

How can I capture the NT (or 2000) UserName (logon) in a VB application.  I need to be able to do this without the user knowing it is being done.  Just need a string variable to hold it.  Should be easy, but I can't find it in my reference books.
ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GolfNut
GolfNut

Environ("UserName") is the one you want.
If you want to find out about more user info, see the code here:
http://216.26.168.92/vbsquare/api/ntvb/index2.html
Other API functions for retrieving the user name is at http://www.allapi.net/apilist/GetUserName.shtml

Thanks

Ryan
Avatar of snapdrag0n420

ASKER

Sorry about the delay, I just figured out how to give points for comments.