How does A_IsAdmin work?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

How does A_IsAdmin work?

18 Feb 2015, 21:06

I have two user accounts, one is an admin account the other is a regular account. If I run a script containg the line msgbox %A_IsAdmin% I get the answer 0 each time. Shouldn't a script run under my Admin acoount have admin rights? Thanks.
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
Contact:

Re: How does A_IsAdmin work?

18 Feb 2015, 22:19

A_IsAdmin is true if script is running as administrator (right click, RunAs Administrator)
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: How does A_IsAdmin work?

18 Feb 2015, 22:58

Thanks, how do I determine if the user has Admin rights?
just me
Posts: 9457
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: How does A_IsAdmin work?

19 Feb 2015, 05:26

PuzzledGreatly wrote:Thanks, how do I determine if the user has Admin rights?
viewtopic.php?p=25618#p25618
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: How does A_IsAdmin work?

19 Feb 2015, 06:38

Thanks for the link, just me. That method works well.
0sync0
Posts: 46
Joined: 05 Aug 2016, 13:57

Re: How does A_IsAdmin work?

01 Nov 2016, 21:26

Coco wrote:A_IsAdmin is true if script is running as administrator (right click, RunAs Administrator)
Why is A_IsAdmin true when the script is not run as administrator?
imustbeamoron
Posts: 44
Joined: 18 Aug 2016, 22:56

Re: How does A_IsAdmin work?

01 Nov 2016, 22:22

what does this return?

Code: Select all

MsgBox % DllCall("Shell32.dll\IsUserAnAdmin")
0sync0
Posts: 46
Joined: 05 Aug 2016, 13:57

Re: How does A_IsAdmin work?

01 Nov 2016, 23:12

imustbeamoron wrote:what does this return?

Code: Select all

MsgBox % DllCall("Shell32.dll\IsUserAnAdmin")
1

Does that mean everything is run as admin?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, mikeyww and 458 guests