Expand my Community achievements bar.

SOLVED

Windows User Name

Avatar

Level 9

Is there a script to get the windows user name (name of person logged into the PC) and have it populate a field?

1 Accepted Solution

Avatar

Correct answer by
Level 6

You can use the identity.loginName property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.791.html

But access to it is indeed security restricted, so you'd either have to install a folder-level JavaScript file on each user's machine or certify the document and get the users to trust it execute privileged JavaScript.

View solution in original post

3 Replies

Avatar

Employee

You'll need to check if javascript allows/has functions to do this. Most likely, this would be a security issue and may not be allowed.

Avatar

Correct answer by
Level 6

You can use the identity.loginName property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.791.html

But access to it is indeed security restricted, so you'd either have to install a folder-level JavaScript file on each user's machine or certify the document and get the users to trust it execute privileged JavaScript.

Avatar

Level 9

Thank you both for your replies. Using

Textfield1.rawValue = identity.loginName; I get a NotAlloowedError: Security settings prevent access to this property or method. Thanks you for the information.-Don