Jump to content

Why this script does not work at startup unless i execute it with double click ?


Recommended Posts

1 hour ago, tonycst said:

Thats your problem.

Virtual machines are not physical machines.

Rest is useless debate.

Really? this is a Joke right? OS behavior is the same... I'm done with you.

I wish you best of luck and also to your therapist.

Regards
Alien.

Edited by alien4u
Link to comment
Share on other sites

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Link to comment
Share on other sites

19 hours ago, tonycst said:

Please understand ALL OF YOU that the problem IS NOT the network drive or the command or the script, problem is autoit not executing it right.

I have issues running allot of scripts from registry, this is just the simplest to demonstrate.

I have issues importing or exporting registry keys when script executed from registry.
 

Code as simple as:

RunWait(@WindowsDir & "\regedit.exe /S " & $RegFile) ;File to registry
Fails to run at start up when script is executed via registry key. It gives path errors as if it does not know that the regfile is right next to the script.

Adding @scriptdir does not help. Adding #RequireAdmin does not help (kinda does when user is just a user with administrative previledges but is not working when user is Administrator)
 

Its not the script problem. Perhaps my OS is lacking something ?

Running as Administrator does not mean you are running with elevated privileges.

To work in the sys folder will require #requireadmin...to run that via 'run' would require you to turn off UAC (all the way off)...else, you need to use a scheduled task, on login, running as the user, running with elevated permissions, interactively.

Interactive is required, or the script will run on they SYSTEM account (session 0)...each session has their own mapped drives, which can not be shared.

You can also get tricky, and use a generic scheduled task (running with elevated permissions), which continually polls for new sessions, and then execute paexec to run a command interactively with that new session.

 

Ignorance of windows does not mean that the issue is with AutoIT.  You need to know why things work, or don't work, and how to debug it.  You should do excessive logging to see exactly what is executed, and what is not, until you figure that out

 

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

On 4/13/2016 at 5:57 PM, jdelaney said:

Running as Administrator does not mean you are running with elevated privileges.

To work in the sys folder will require #requireadmin...to run that via 'run' would require you to turn off UAC (all the way off)...else, you need to use a scheduled task, on login, running as the user, running with elevated permissions, interactively.

Interactive is required, or the script will run on they SYSTEM account (session 0)...each session has their own mapped drives, which can not be shared.

You can also get tricky, and use a generic scheduled task (running with elevated permissions), which continually polls for new sessions, and then execute paexec to run a command interactively with that new session.

 

Ignorance of windows does not mean that the issue is with AutoIT.  You need to know why things work, or don't work, and how to debug it.  You should do excessive logging to see exactly what is executed, and what is not, until you figure that out

 

Wow someone speaks English here

Thanks !

Its interesting because i had no issues with scripts that run from registry in the past. I started to have issues about 2 years ago.

I have not upgraded Windows 7 nor changed computer or downloaded any service packs or anything but autoit.

 

Thanks for constructive reply that answered my question.

none interactive execution=trouble

Link to comment
Share on other sites

8 hours ago, tonycst said:

Wow someone speaks English here

Thanks !

Its interesting because i had no issues with scripts that run from registry in the past. I started to have issues about 2 years ago.

I have not upgraded Windows 7 nor changed computer or downloaded any service packs or anything but autoit.

 

Thanks for constructive reply that answered my question.

none interactive execution=trouble

Yes and you have the same info on post #51 and post #52

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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