WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Microsoft Client
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get remote user name

Keywords: 	 Get remote user name wntUserGet w95UserGet

Question:

Is there a function to get the current username of the user on a remote pc. i use this script but theres an error:

AddExtender("WWW9534I.DLL")
username=w95GetUser(\\gm-edp1)
Message("Current User is",username)

it returns my username not their username

Answer:

If you have admin access to the machine and can do a RegConnect to it,you can query the remote registry for...
NT
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon [DefaultUserName]

Win9x
HKLM\Network\logon[Username]
is the name of the last interactively logged on user.
Article ID:   W14638
Filename:   Get remote user name.txt
File Created: 2001:03:01:13:50:48
Last Updated: 2001:03:01:13:50:48