No announcement yet.

User full name from Windows 95

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
    If you try to make something idiot-proof, someone will invent a better idiot.

  • #2
    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)


    • #3
      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...


      mailto:[email protected][email protected]</A>
      Scott Turchin
      MCSE, MCP+I
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi


      • #4
        Might this help?

        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)
        		FUNCTION = TRIM$(acUserName)
        	END IF
        George W. Bleck
        Senior System Engineer
        KeySpan Corporation
        <b>George W. Bleck</b>
        <img src=''>


        • #5
          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?
          If you try to make something idiot-proof, someone will invent a better idiot.