msd1994

shortcut in startup folder, still not starting

13 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



try changing startup things in msconfig.exe

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

What version of Windows?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Still haven't found a solution for this, does anyone have an idea to what else could be preventing them from auto-starting?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 

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