Jump to content

How to run AutoIt3 script in RunOnceEx?


f9cator

Recommended Posts

Hi,

I tried to run the AutoIt3 script in RunOnceEx but was unsucessful. Below is how I added the codes. Both autoit3.exe and install_avant.au3 files are in the 'software' folder.

REG ADD %KEY%\015 /V 1 /D "%CDROM%\software\autoit3 install_avant.au3" /f

Did I miss out something in the code or this is not the correct way to do it?

Help is much appreciated.

Thank you.

f9cator

Edited by f9cator
Link to comment
Share on other sites


It works!

Thanks blinkdt!

You are a genius. :)

I think so too. For the question of where the actual working directory is when executing a file from the registry, I received this result with executing this code.

MsgBox(0, 'WorkingDir is ...', @WorkingDir)

The return was C:\

If you had you script within the systemdrive path then your original code may have worked. Nothing better though of being explicit with the fullpath though.

Edited by MHz
Link to comment
Share on other sites

It works!

Thanks blinkdt!

You are a genius. :)

I think so too. For the question of where the actual working directory is when executing a file from the registry, I received this result with executing this code.

MsgBox(0, 'WorkingDir is ...', @WorkingDir)

The return was C:\

If you had you script within the systemdrive path then your original code may have worked. Nothing better though of being explicit with the fullpath though.

Luv this place grreat minds :thumbup

MC.

Link to comment
Share on other sites

Why not compile the script to .exe?

thats how i do it , works for me

Yeah,but ya don't need to..

if you need to worry about the space wasted in compiling all ur scripts then there are much easier ways to save space.

not to mention you actually get some added features from using a compiled script

Link to comment
Share on other sites

Why not compile the script to .exe?

thats how i do it , works for me

Yeah,but ya don't need to..

if you need to worry about the space wasted in compiling all ur scripts then there are much easier ways to save space.

not to mention you actually get some added features from using a compiled script

What features are better when compiled ? :huh:

Compiling

+ Standalone executable.

+ Easier commandline.

- Need to use compile Directives to change resource information for script version identification.

UnCompiled

+ Easy to edit.

+ No Compiler Directives to worry about.

+ Space saving.

+ Easy to check the contents before burning.

+ Any #Include files can be shared.

+ No need to store script sources separately for Compile.

+ No need to decompile.

+ Less chance of curruption.

+ No false-positive virus alerts.

+ More AutoIt scripts used makes Uncompiled scripts easier to manage.

+ Can do anything a compiled script can do, other then the AutoIt3.exe needed to execute.

To be honest, compiling absolutely sucks when not required. So does 1 line statements without some facts to show.

My whole UA Disk runs on uncompiled autoit scripts and I have mentioned my simple method before shown here.

Link to comment
Share on other sites

Hi,

I tried to run the AutoIt3 script in RunOnceEx but was unsucessful. Below is how I added the codes. Both autoit3.exe and install_avant.au3 files are in the 'software' folder.

REG ADD %KEY%\015 /V 1 /D "%CDROM%\software\autoit3 install_avant.au3" /f

Did I miss out something in the code or this is not the correct way to do it?

Help is much appreciated.

Thank you.

f9cator

another way

REG ADD %KEY%\015 /V 1 /D "%CDROM%\software\autoit3.exe \"%~dp0install_avant.au3\"" /f

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

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