2 Replies Latest reply: Jul 7, 2016 8:51 AM by Nicolas MARTIN RSS

    How to get the user name in VBS?

    Nicolas MARTIN

      Hello,

       

      I'ld like to retrieve the name of the user that uses the application in VBS.

       

      I use the following property:

       

      ActiveDocument.GetApplication.GetProperties.UserName
      
      

       

      When I open the application with the desktop client, it gives me the right user name.

      When I open the application on the access point, it gives me the right user name.

      When I open the application with the desktop client, but with "open on server" "as a different user", it gives me the wrong user name (it returns the local user).

       

      The QV function "OSUser" gives me the right user name.

       

      How can I have the equivalent of "OSUser" in VBS?