Jump to content

Error 193 while using func RUN()


Armand
 Share

Recommended Posts

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 ?!

Link to comment
Share on other sites

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 ?!

Link to comment
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 ?!

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
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...