Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autostart Autohotkey as Administrator


  • Please log in to reply
17 replies to this topic
michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010
Is there any way to autostart Autohotkey as Administrator every time Windows starts?

Windows 7, UAC enabled.

The main problem is UAC which pops-up every time. How to get rid of UAC's pop-up confirmations?

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
maybe this will help you to make it permanent to run as administrator checkout Option three in that webpage
<!-- m -->http://www.sevenforu... ... rator.html<!-- m -->

and to get rid off UAC this link will guide you
<!-- m -->http://www.howtogeek... ... ows-vista/<!-- m -->

michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010

maybe this will help you to make it permanent to run as administrator checkout Option three in that webpage
<!-- m -->http://www.sevenforu... ... rator.html<!-- m -->

and to get rid off UAC this link will guide you
<!-- m -->http://www.howtogeek... ... ows-vista/<!-- m -->

First of all, thanks for the reply, Jasdeep. I have already seen methods in the first link - all of them need UAC confirmation.
The second link is about how to disable UAC at all. It's not possible. UAC can not be turned off

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
there is a way to do it but it works only for administrator account
<!-- m -->http://www.howtogeek... ... tors-only/<!-- m -->

  • Guests
  • Last active:
  • Joined: --
compiled EXE script only requires 1 time confirmation

michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010

there is a way to do it but it works only for administrator account
<!-- m -->http://www.howtogeek... ... tors-only/<!-- m -->

UAC cann't be edited at all. No way to even open Local Security Policies window.

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007

there is a way to do it but it works only for administrator account
<!-- m -->http://www.howtogeek... ... tors-only/<!-- m -->

UAC cann't be edited at all. No way to even open Local Security Policies window.

this isnt true of course unless your NOT the admin of your local PC

Fact you can disable UAC
you can Edit what level of security it has
Never lose.
WIN or LEARN.

michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010

compiled EXE script only requires 1 time confirmation

Yeah. But the question is how to avoid this 1 time, because the script should be run every start of windows. UAC shouldn't be edited at all (no Local Policy changes or similar)

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
i think you didnt read the article properly it says that

For Windows Vista Home users, the Local Security Policy doesn’t come with the distribution, so you’ll have to use the following registry file.

Just download, extract and double-click on the registry hack file to add the information into the registry. That’s all there is to it. Update: I’ve added in another registry hack file to re-enable UAC again.

Download DisableUACforAdmin Registry Hack



michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010

UAC cann't be edited at all. No way to even open Local Security Policies windowthis isnt true of course unless your NOT the admin of your local PC

Fact you can disable UAC
you can Edit what level of security it has

I don't want to edit UAC settings because it's not an optimal solving of the problem. Admin has password. It could be best if I could input some code in the script like 'and now run as admin with this login/password' But what I don't know is if it's possible

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
never mind that there is a runas command in ahk
Never lose.
WIN or LEARN.

michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010
deleted

Chaze
  • Members
  • 6 posts
  • Last active: May 15 2010 12:49 PM
  • Joined: 24 Oct 2009
Bumping this. It's really annoying that autohotkey doesn't work for elevated processes. Is there no workaround yet?

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
you can actually set the autohotkey application with elevated rights perminantly
<!-- m -->http://msdn.microsof... ... leges.aspx<!-- m -->

<!-- m -->http://msdn.microsof...e/cc163486.aspx<!-- m -->

and finally
<!-- m -->http://technet.micro... ... 09691.aspx<!-- m -->
Never lose.
WIN or LEARN.

robert_ilbrink
  • Members
  • 561 posts
  • Last active: Mar 10 2015 08:36 PM
  • Joined: 05 May 2012
There is a much easier way to run ANY script (AutoHotKey or DOS) with administrator rights.

Go to the script directory, right-click on the .ahk file and select "Create Shortcut".

Right-click on the shortcut and select "Properties".
Inside the properties GUI, select the "Shortcut" tab and press the "Advanced" button.
Then check the "Run as administrator" checkbox. Click OK, Apply and OK.
From now on use the shortcut to launch your script.

You don't need to compile the script and you can modify the script to your heart's content.
Once you click the shortcut the UAC will ask you to confirm that you want to run this with administrator rights.
The A_IsAdmin variable confirms that the script runs with admin rights.