Jump to content

Recommended Posts

Posted

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!

Posted

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

Posted

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...