Sign in to follow this  
Followers 0
Ontosy

currently logged on user when run as administrator

5 posts in this topic

#1 ·  Posted (edited)

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



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

Not :)

Share this post


Link to post
Share on other sites

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

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  
Followers 0