Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
VB get win2k current logged in user ??
Name: kayla Date: April 4, 2002 at 14:50:12 Pacific
Comment:
Does someone know how to gain the current username from the user that is logged into a windows 2000 system. Can you do this with an API call?
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUserName() As String ' Returns the network login name Dim lngLen As Long, lngX As Long Dim strUserName As String strUserName = String$(254, 0) lngLen = 255 lngX = apiGetUserName(strUserName, lngLen) If lngX 0 Then fOSUserName = Left$(strUserName, lngLen - 1) Else fOSUserName = "" End If End Function
Summary: I've been googling for ages but I can't find out how to get the name of the currently logged in user in Windows using VBSCript. I know how to get the list of users into an array, but how can I get th...
Summary: Hi, I am trying to get the currently logged on username from an XP machine and use that to map the users home drive. Below is my script, but it doesn't seem to work. Any help would be appreciated. ...
Summary: 1) This, as the name suggests runs your program only as the currently logged-in user. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run This key will run it for every user on the PC, reg...