Jump to content
Sign in to follow this  
Ontosy

currently logged on user when run as administrator

Recommended Posts

Ontosy

I log in windows as "AlfaUser"

If i launch as administrator this script:

MsgBox(0,0,@UserName)

i obtain "Administrator"

but do it is possible to obtain "AlfaUser"?

I have found and works. Have other?

Edited by Ontosy

Share this post


Link to post
Share on other sites
stormbreaker

Does this help you?

$STRING = StringSplit(@UserProfileDir, "")
msgbox(64, "", $STRING[$STRING[0]])

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

:bye: Hey there, was I helpful?

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

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites
JLogan3o13

If the script in your link works, what exactly is your question?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Ontosy

wondering if there is a more direct way

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.