Jump to content
Sign in to follow this  
fishinggeek

Unable to execute any AutoIt Scripts

Recommended Posts

fishinggeek

I moved some of my execution paths to some exe files that I was running for installation purposes around on my server. Now I cannot execute any AutoIt scripts. Not even ones that I create locally on my box. I have registered the AutoIt dll and have the app installed on the same box. I created a simple script to open the command prompt and i get: AutoIt Error Line -1: Error: Unable to execute the external program.

These are files that I have been able to execute before, and all permissions on the folders are the same. Any ideas as to why this is happening?

Share this post


Link to post
Share on other sites
GEOSoft

I moved some of my execution paths to some exe files that I was running for installation purposes around on my server. Now I cannot execute any AutoIt scripts. Not even ones that I create locally on my box. I have registered the AutoIt dll and have the app installed on the same box. I created a simple script to open the command prompt and i get: AutoIt Error Line -1: Error: Unable to execute the external program.

These are files that I have been able to execute before, and all permissions on the folders are the same. Any ideas as to why this is happening?

And you didn't bother to change the registry paths.

If you just put things back to where they were and then run the Uninstall for autoIt, you can reinstall to wherever you want. Or open up the registry and change the paths.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
fishinggeek

And you didn't bother to change the registry paths.

If you just put things back to where they were and then run the Uninstall for autoIt, you can reinstall to wherever you want. Or open up the registry and change the paths.

Not sure that I am following you on this one. Why do I need to change registry paths? The apps are not installed on the system currently... I am using VMWare and am trying to setup a new system. So there is literally a OS and AutoItv3 installed. I have registered the AutoIt dll as well. I moved the location of the actual exe files, say for MS Visual Studios, to a different location on my share, changed that path in the Autoit Script, and now I am getting this error: C:\Documents and Settings\cakeez\Desktop\VS2003.au3 (14) : ==> Unable to execute the external program.: This is the error when I try and debug, F5, the script. It has been working for about 3 months now, but I needed to move things around. i dont see where a registry path change is necessary. Thank you for any other insite into this issue... if you still think that it is registry related, please explain.

Share this post


Link to post
Share on other sites
fishinggeek

which keys in the registry would I update? There is not much there for Autoit. And the apps are not installed yet.

Share this post


Link to post
Share on other sites
sugi

See if double-clicking on c:\program files\autoit3\autoit3.exe works. If not, you got a general problem running .exe-files.

If that works it's just the registry for .au3 files that's broken. Shift-Rightclick on an .au3 file and choose "Open with...", then select autoit3.exe, choose to remember the setting and you should have it working again.

Share this post


Link to post
Share on other sites
fishinggeek

there is no issue with opening the application. I can run autoit3.exe, and the editor, no matter how I open the script. The error happens when I try to run the exe file from the script. Does autoit tie something to the path of the files? Is there a hidden dll or something that gets written with the exe that tells it where to look. I should be able to type:

Run("what_ever_I_want.exe")

save the au3 file, compile it to exe and then run it.

Then change that same au3 file to:

Run("desktop\what_ever_I_want.exe")

save the au3 file, compile it to exe and then run it without any errors.

This is not happening. It appears that in some wierd way the path to the file is being stored somewhere else.

Share this post


Link to post
Share on other sites
sugi

there is no issue with opening the application. I can run autoit3.exe, and the editor, no matter how I open the script. The error happens when I try to run the exe file from the script. Does autoit tie something to the path of the files? Is there a hidden dll or something that gets written with the exe that tells it where to look. I should be able to type:

Run("what_ever_I_want.exe")

save the au3 file, compile it to exe and then run it.

Then change that same au3 file to:

Run("desktop\what_ever_I_want.exe")

save the au3 file, compile it to exe and then run it without any errors.

This is not happening. It appears that in some wierd way the path to the file is being stored somewhere else.

So you do not have a problem running AutoIt scripts, instead you have a problem while using the Run-function?

Maybe you should clarify exactly what you are trying (with example code).

If it's really the Run-function then you should try something like this:

$file="what_ever_I_want.exe"
MsgBox(64, 'Run', 'Fileexists: ' & FileExists($file) & @crlf & $file)
Run($file)

That way you can confirm what exactly you entered and if the file actually exists.

Share this post


Link to post
Share on other sites
fishinggeek

You are miss understanding what I am saying. I can run the Editor, create scripts, and run them. Here is my example again:

I create a script called "Help.au3", all it has in it is 1 line of code: run("c:\notepad.exe"). I can compile this script to an exe, and run it without any issues.

The issue comes about if I move c:\notepad.exe to say c:\temp\notepad.exe, then change the execution path of the run command in my au3 file like so: run("c:\temp\notepad.exe"). I can compile the code to an exe, but when I run the exe I get the error that it can not execute the external program.

If I move the files back to their original locations and change the execution path of the run command back to its original state, compile the code, it works fine. The code that i am using is irrelevant to the situation that I am having.

Share this post


Link to post
Share on other sites
Jos

Are you using Run() or RunAS()?

You are sure that the path in the Run() is correct?

Did you specify the fully qualified path in the first parameter?

You are sure that the WorkDir parameter is correct and the directory exists for the credentials the program is ran with?

You are sure that the Credentials you run the program with has access rights to the new program directory?

These are the type of questions you need to ask yourself. ;)

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
sugi

If I move the files back to their original locations and change the execution path of the run command back to its original state, compile the code, it works fine. The code that i am using is irrelevant to the situation that I am having.

So you are changing the code to reflect the same change you did in the filesystem, and it doesn't work anymore? Then why is the code irrelevant? It's a major part of what is going on, so it IS important.

The code snippet I gave you above checks if the file contained within $file actually exists. Of course that's just a basic check, but considering that AutoIt seems to be unable to run the given file it is an important check.

Share this post


Link to post
Share on other sites
fishinggeek

Found out what is wrong... and this might be because I did not give you all the info on my os. I am Running 64-bit Vista Ultimate. When I copy the path from the explorer adn put it into auto and compile, then turn around and try to run it, it fails. if I type the path then it works... I also have to use the Run("Setup.exe", "path to file") format. If I do this it works. Sorry for any of the confusion, it is sometimes hard to explain exactly what is happening.

end result, dont copy paths and paste them into your script, type them!

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.