Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

username from registry

Status
Not open for further replies.

SlykFX

Programmer
Oct 12, 2002
76
GB
can someone tell me the registry location of the current logged on user please

I can't be bothered to have a sig!
 
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

Is this what you are looking for? It has the Logon User Name

Also a bit deeper:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

has all of the profile stuff.

Hope that helps.
 
There is also the environmental variable %USERNAME%
 
thanks rmiley and bcastner
i did know about the env variable but couldnt use that as the applications im writting dont support those :(

i didnt qutie word what i meant correctly
what i could really do with is the name of the user rather than the username

although thanks for the username anyway as i did need that aswell :)

I can't be bothered to have a sig!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top