Sign in to follow this  
Followers 0
Armand

Error 193 while using func RUN()

8 posts in this topic

#1 ·  Posted (edited)

Opt("RunErrorsFatal", 0)
Run("C:\AU3 in progress\(E)lephant\Addons\(E)DecryptionCheck.exe") ;switch this path to whatever application path you wish.
If @error = 1 Then
    ConsoleWrite("Couldn't start the application, Error: " & @extended)
EndIf

when i try to run a program through:

RUN() - function i get the @error=1 var and the @extended=193.

why does it happen and how can i fix it ?

well... i ran a search and found out that:

ERROR_BAD_EXE_FORMAT
  // The system cannot run something because it is an invalid Windows NT/2000 
  // application.

is infact error 193.

- but what doesn't makes sence to me is why do i get that error ?!

--> the file i'm trying to RUN() is absolutly capable in running under windows as i can run it manually whenever i please !

--> the file's path is also 100% correct since i've called an: FileExists() function right before the RUN() func.

--> Also, i've made the script write whatever lays inside the '()' of the RUN() function, then copied it exactly as is to the

Start->RUN dialogue and it runs the program just fine...

--> could it be that the RUN() function if ran without any flag cannot be called twice in a script ?!

--> i've just tried it with the path: "C:\client.exe", it seems to work fine that way...

--> also with the path: "C:\AU3 in progress\(E)lephant\Plugins\(E)lephant - RS.Downloader.exe" it works just fine...

--> what could the problem be ? should the path be formatted in a certain specific way? the last one and the first one are almost the same, but the filename !!!

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

all the other files i'm running with the script are AU3 compiled ones...

--> Also:

ShellExecuteWait("(E)DecryptionCheck.exe","","C:\AU3 in progress\(E)lephant\Addons\")

works fine !!!

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

wow no reply ... ?!

Maybe it is not an invalid error as you are assuming and the exe indeed is a formatted wrong.

I suggest you recompile it.

Share this post


Link to post
Share on other sites

welll.. it is !!!

the .exe is working fine when i run it through start-run...

anyone else maybe ?


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

This works fine for me:

DirCreate("C:\AU3 in progress\(E)lephant\Addons")
Filecopy(@WindowsDir & "\notepad.exe", "C:\AU3 in progress\(E)lephant\Addons\(E)DecryptionCheck.exe")
Run("C:\AU3 in progress\(E)lephant\Addons\(E)DecryptionCheck.exe")

So how can this issue be replicated ?

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

#8 ·  Posted (edited)

Add the working directory maybe? If the exe relies on other files it may need to be called with a working directory

Run("C:\AU3 in progress\(E)lephant\Addons\(E)DecryptionCheck.exe","C:\AU3 in progress\(E)lephant\Addons")

Or try putting the entire path in speach marks

Run('"C:\AU3 in progress\(E)lephant\Addons\(E)DecryptionCheck.exe"',"C:\AU3 in progress\(E)lephant\Addons")
Edited by ChrisL

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  
Followers 0