/build/static/layout/Breadcrumb_cap_w.png

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. 


0 Comments   [ + ] Show comments

Answers (3)

Posted by: mpace 11 years ago
Red Belt
2

You'll notice "On Success" you are having it launch three scripts all at once; in other words "Kbox, on success I want you to do tasks 1 through 5". If invis.vbs hides everything that is executed from that script you could have one batch file doing all three of those tasks with a "start /wait" command on each line, otherwise your sleep method would be the best course of action.

Doesn't the Skype installer uninstall old versions? It seems that just using the /qn switch on the MSI would do what you wanted.


Comments:
  • the Skype documentation indicated that it should uninstall the old version, but that is not what I found. It through me a "must uninstall old version" error and then exited.

    I found that even if I split the "install" part up into a whole new task (Task 1: Uninstall, Task 2: Install) it wouldn't wait for the first task to finish. - muebel 11 years ago
Posted by: dchristian 11 years ago
Red Belt
2

Since your just calling bat files and vbs you might want to try shell scripts. I think this will give you the result your after.


Comments:
  • the shell scripts result in a blank cmd window sitting there, begging for the user to close it - muebel 11 years ago
Posted by: alsmith 11 years ago
Senior Yellow Belt
0

I usually call all my batch files from a singular run batch file. I will call all child batch files with the start /wait option to make sure the batch file has run before the next step starts

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ