K1000 Online KScript confusion - silent uninstall/install for Skype
I have been working with the K1000 scripting mechanisms as a way of updating Skype the last couple days, and although I have finally figured it out, I am left very confused, and was hoping to straighten out a few things.
My method consists of using wscript with a VBS wrapper that silently launches various batch files. The first thing that happens is a batch is run to stop skype via skype.exe /shutdown. Then I run another batch script to calls a powershell command to uninstall skype. Finally the install skype batch is run, which calls the skype msi silently.
This is what the successful KScript looks like:
My trouble was that it seems that all of those batch scripts end up running at the same time!
My solution was to start the install batch script with a 60 second delay (pinging a non-existant address). Otherwise the install would fail because the uninstall hadn't finished.
I found that even if I split the Install part into a whole separate task, that both tasks started concurrently.
Is this how the KScripting is supposed to work? My impression was that each step or task would wait for the previous step to finish.