nikink Posted October 5, 2006 Posted October 5, 2006 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!
Helge Posted October 5, 2006 Posted October 5, 2006 Why do you make @ComSpec run your EXE-file when Run() can do this directly ?
nikink Posted October 5, 2006 Author Posted October 5, 2006 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-)
nikink Posted October 5, 2006 Author Posted October 5, 2006 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-)
Helge Posted October 5, 2006 Posted October 5, 2006 (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 Edit : like this : $file = @WindowsDir & "\Jade.bmp" Run(@ComSpec & ' /c start "" "' & $file & '"', "", @SW_HIDE) Edited October 5, 2006 by Helge
nikink Posted October 5, 2006 Author Posted October 5, 2006 Yeah, that's it. msiexec.exe uses it too. Live 'n' learn! B-) Thanks.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now