Sign in to follow this  
Followers 0
nikink

Unable to execute external program

6 posts in this topic

Hi folks

I'm automating an install over a network but I keep getting this "Unable to execute external program" error.

I swear this same commane worked last week... but I must've been dreaming???

RunWait(@ComSpec & '/c "' & @ScriptDir & 'SQLEXPR.EXE" /qb ADDLOCAL=ALL SQLAUTOSTART=1 INSTANCENAME="QSRNVivo" SQLCOLLATION="Latin1_General_BIN"', @TempDir, @SW_HIDE)
Exit

Is it because it's a .exe instead of a msi? Because the same command with msi's works fine as far as I can tell.

Same command works fine when I use STart->Run or from command prompt. Seems to be just something AutoIt can't Automate...

Help!

Share this post


Link to post
Share on other sites



Why do you make @ComSpec run your EXE-file when Run() can do this directly ?

Share this post


Link to post
Share on other sites

Why do you make @ComSpec run your EXE-file when Run() can do this directly ?

Ummm... good question... erm... cuz that's how I've seen it done in every example I've looked at! I'll try without it... B-)

Share this post


Link to post
Share on other sites

Ummm... good question... erm... cuz that's how I've seen it done in every example I've looked at! I'll try without it... B-)

Erm hey... that worked! I'll just carry on then, nothing to see here people, move along... B-)

Thanks a million!

God I love this forum! B-)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hehe. Btw, you might have seen code like that where people have tried to run files

such as JPGs or MP3s, which isn't supported by Run() directly. That's probably what's

confused you :lmao:

Edit : like this :

$file = @WindowsDir & "\Jade.bmp"

Run(@ComSpec & ' /c start "" "' & $file & '"', "", @SW_HIDE)
Edited by Helge

Share this post


Link to post
Share on other sites

Yeah, that's it. msiexec.exe uses it too.

Live 'n' learn! B-)

Thanks.

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