Jump to content

Recommended Posts

Posted (edited)

Hi all,

I was wondering why even with a shortcut in the startup folder %APPDATA%MicrosoftWindowsStart MenuProgramsStartup of a few scripts I'd like to start with windows that I compiled to EXE's, they don't start with admin privilleges. The scripts aren't kept on the same drive as the boot drive, though both are internal drives, and other programs on the same drive as my compiled scripts start up with windows using the same method. Is there any alternative method I could try or any way to fix this issue? I do need them to run with admin privilleges.

Thank you!

Edited by msd1994
Posted

Do your "other programs" start with admin?

Does you account have admin rights?

yes they do and it does have admin rights. 

 

try changing startup things in msconfig.exe

 

I have checked msconfig and they are both enabled there as well.

Posted

What version of Windows?

windows 7 x64

 

Also, as a start to debugging, in one of your scripts, add Sleep(1000 * 60) at top to wait 1 minute before it would normally start.

 

Okay I'll try this, but why would it need to wait a minute to start before trying to open just because of admin rights? If I make it so it doesn't need admin rights, it starts up just fine without any delay to when it starts.

Posted

windows 7 x64

 

Okay I'll try this, but why would it need to wait a minute to start before trying to open just because of admin rights? If I make it so it doesn't need admin rights, it starts up just fine without any delay to when it starts.

I don't know, but debugging can be a process of elimination sometimes.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

  • 3 weeks later...
  • 3 months later...
Posted

Found a workaround. Just added entries to task scheduler to start each script with highest permissions and run automatically when I log into my user. Still not sure why startup folder or registry entries weren't working though.

Posted

Are you using and of the following at the top of your script before you compile it?

#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator

or

#pragma compile(ExecLevel, requireAdministrator)

Windows will not allow an executable to run at startup that has a manifest that request elevation.

Try using the following at the top of the script.

#RequireAdmin
#pragma compile(ExecLevel, asInvoker)

or 

#RequireAdmin
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker

The #RequireAdmin directive causes the script to re-execute, requesting the Admin privilege.  

 

Adam

Posted

Interesting to know Adam, I was scratching my head on this one because I use #requireadmin and it works just fine for me. Wonder if he's using something else 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...