f9cator Posted January 2, 2006 Share Posted January 2, 2006 (edited) 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" /fDid 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 January 2, 2006 by f9cator Link to comment Share on other sites More sharing options...
blinkdt Posted January 2, 2006 Share Posted January 2, 2006 Try this:REG ADD %KEY%\015 /V 1 /D "%CDROM%\software\autoit3.exe %CDROM%\software\install_avant.au3" /f Link to comment Share on other sites More sharing options...
f9cator Posted January 2, 2006 Author Share Posted January 2, 2006 It works!Thanks blinkdt!You are a genius. Link to comment Share on other sites More sharing options...
MHz Posted January 2, 2006 Share Posted January 2, 2006 (edited) 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 January 2, 2006 by MHz Link to comment Share on other sites More sharing options...
BoardBabe Posted January 2, 2006 Share Posted January 2, 2006 Why not compile the script to .exe? Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted January 3, 2006 Share Posted January 3, 2006 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 MC. Link to comment Share on other sites More sharing options...
muiz Posted January 4, 2006 Share Posted January 4, 2006 Why not compile the script to .exe?thats how i do it , works for me Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted January 4, 2006 Share Posted January 4, 2006 Why not compile the script to .exe?thats how i do it , works for meYeah,but ya don't need to.. Link to comment Share on other sites More sharing options...
Swimming_Bird Posted January 5, 2006 Share Posted January 5, 2006 Why not compile the script to .exe?thats how i do it , works for meYeah,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 More sharing options...
MHz Posted January 5, 2006 Share Posted January 5, 2006 Why not compile the script to .exe?thats how i do it , works for meYeah,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 scriptWhat features are better when compiled ? 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 More sharing options...
Nucleus Posted January 5, 2006 Share Posted January 5, 2006 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" /fDid I miss out something in the code or this is not the correct way to do it?Help is much appreciated.Thank you.f9catoranother wayREG ADD %KEY%\015 /V 1 /D "%CDROM%\software\autoit3.exe \"%~dp0install_avant.au3\"" /f Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now