Announcement

Collapse
No announcement yet.

User full name from Windows 95

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matthew Berg
    replied
    I set up the login script on the NT server to execute my application whenever a user logs in. The application uses the WNetGetUser() function to determine who is logging in, and I was going to use this user name to get the Full Name of the account (visible beside the Username in User Manager). As users may login from Windows 95, Windows NT Workstation or Windows 2000 workstations, I was trying to find a solution that would work on any of these platforms.

    However, when I log into the server from a Windows 95 terminal, the WNetGetUser() function in my application fails to return the user name (even though the login script can't execute until the user has provided their login credentials). It works fine if I manually execute the application after Windows has finished thrashing the HDD. Is there any way to determine the name of the user account being used to login to a server, when the login script is executing, on a Windows 95 PC?

    Leave a comment:


  • George Bleck
    replied
    Might this help?

    Code:
    FUNCTION GetloggedOnUser() AS STRING
    	Dim acUserName as Asciiz * 100
    	Dim nUserName as Long
    	nUserName = SizeOf(acUserName)
    	IF (GetUserName(acUserName, nUserName) = 0) THEN
    		FUNCTION = "Failed to lookup user name, error code " + Str$(GetLastError)
    	ELSE
    		FUNCTION = TRIM$(acUserName)
    	END IF
    END FUNCTION
    ------------------
    George W. Bleck
    Senior System Engineer
    KeySpan Corporation

    Leave a comment:


  • Scott Turchin
    replied
    I would think to gain any information like that you would need admin rights, same as using the user manager.
    If you have those rights I believe you can enum users and pull a piece from that.
    I've got some code someone sent me but I think it's in VB and I haven't done anything with it...


    Scott

    ------------------
    Scott
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Paul Dwyer
    replied
    I've never tried to use the NetUserGetInfo API call from 95 but I think it will work provided that there are no permission issues.
    You need the server and the username.

    I haven't really worked with this api but I have worked with NetUserAdd in VB so I might be able to help if you have problems

    ------------------

    Paul Dwyer
    Network Engineer
    Aussie in Tokyo
    (Paul282 at VB-World)

    Leave a comment:


  • Matthew Berg
    started a topic User full name from Windows 95

    User full name from Windows 95

    Is it possible to get the full name of a user account being used to log into an NT server from a Windows 95 workstation? Unfortunately, the method described in M$ KB article Q119670 only works for Windows NT and Windows 2000 clients.
Working...
X