Dec 24, 2003 #1 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!
can someone tell me the registry location of the current logged on user please I can't be bothered to have a sig!
Dec 24, 2003 #2 rmiley MIS Apr 11, 2003 66 US 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. Upvote 0 Downvote
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.
Dec 24, 2003 #3 bcastner IS-IT--Management Aug 13, 2002 29,271 US There is also the environmental variable %USERNAME% Upvote 0 Downvote
Dec 24, 2003 Thread starter #4 SlykFX Programmer Oct 12, 2002 76 GB 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! Upvote 0 Downvote
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!
Dec 24, 2003 #5 bcastner IS-IT--Management Aug 13, 2002 29,271 US Are you sure there is no function such as getenv("USERNAME"? Just curious, as most languages support such a function. In any case here is a good example in VB using the Win APIs: http://www.mvps.org/vbnet/index.html?code/network/netusergetinfo.htm Remember in coding that Administrators will not have an extended name. Upvote 0 Downvote
Are you sure there is no function such as getenv("USERNAME"? Just curious, as most languages support such a function. In any case here is a good example in VB using the Win APIs: http://www.mvps.org/vbnet/index.html?code/network/netusergetinfo.htm Remember in coding that Administrators will not have an extended name.