Jump to content
Sign in to follow this  
stev379

RunWait(@ComSpec...) not moving on to next command

Recommended Posts

stev379

The commands below work when executed as an Au3 .exe, but each after each line completes, the cmd window stays open until I manually close it. Then the next command begins. I've tried with just the "Run" command but it tries to run them all quickly and exits. What did do wrong and how can I get it to run each line without user interaction?

Thanks for any help or suggestions!

I got the command lines from: http://www.adobe.com/cfusion/knowledgebase...x.cfm?id=330817

RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\705efgj\Ac705StVP_efgj.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\707\Acro707.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\708\Acro708.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\709\Acro709.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)

EDIT: ...sorry about the line wrapping. Users keep popping in and I barely had time to post.

Edited by stev379

Share this post


Link to post
Share on other sites
MrBeatnik

The commands below work when executed as an Au3 .exe, but each after each line completes, the cmd window stays open until I manually close it. Then the next command begins. I've tried with just the "Run" command but it tries to run them all quickly and exits. What did do wrong and how can I get it to run each line without user interaction?

Thanks for any help or suggestions!

I got the command lines from: http://www.adobe.com/cfusion/knowledgebase...x.cfm?id=330817

RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\705efgj\Ac705StVP_efgj.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\707\Acro707.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\708\Acro708.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)
RunWait(@ComSpec & " /k msiexec /p C:\Adobe709\709\Acro709.msp REINSTALLMODE=omus REINSTALL=all REBOOT=REALLYSUPPRESS /qn", "", @SW_MINIMIZE)

EDIT: ...sorry about the line wrapping. Users keep popping in and I barely had time to post.

Comspec /c... not /k


Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites
SmOke_N

Did you try:

" /c msiexec

Instead of:

" /k msiexec

?


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
stev379

Comspec /c... not /k

Did you try:

" /c msiexec

Instead of:

" /k msiexec

?

Thanks!

I did try that in one my tests earlier today. They closed, but didn't move on. I've made a few other edits along the way since then. Perhaps I missed something else that I have since corrected, as this is the only issue the install currently has. I'll try again and let you know.

Cheers!

Share this post


Link to post
Share on other sites
lod3n

You don't need @comspec /c at all, as you are not running a shell command (like DIR, etc.) Msiexec.exe is a program. Just run it like you would any other program.

Be aware though, application installers will sometimes spawn child processes and terminate. Which means your RunWait returns even though the installation isn't done yet. You might consider using WMI to make sure no processes still exist which have a parent process id which matches the process ID of your installer program.


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

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  

×