/build/static/layout/Breadcrumb_cap_w.png

How to delay Task 2 in scripting?

Task 1)

Directory: $(KACE_SYS_DIR)

File: cscript.exe

Parameters: $(KACE_DEPENDENCY_DIR)\yourscript.vbs

I need a delay until this script is completely finished. Wait for completion is not working.

2) Install software after task 1 is finished.



I am trying to run an Office 2010 uninstaller but Office 2013 install runs at the same time.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: rockhead44 9 years ago
Red Belt
0
Can you run it via a batch file? If so, you could have TIMEOUT be the first line of the script and delay for however many seconds you think would cover the necessary time. 

Comments:
  • That doesn't work in Kace. - itsamurai 9 years ago
    • Sure it does, when you call a file as in your example, you would call the .bat file. - jknox 9 years ago
      • I called the batch file which called cscript for the vbs file and I could not get it to work in Kace. Do you have a specific working example? - itsamurai 9 years ago
  • When I run a batch file with a timeout or ping command to delay tasks, there is still no delay between the tasks in KACE. - itsamurai 9 years ago
Posted by: jknox 9 years ago
Red Belt
0
Part of the problem is that given your scenario, the K1000 doesn't have any way to know that the .vbs file completed.  It really only knows that the .vbs file was called successfully.

The best way to do it in my opinion would be to modify the .vbs that uninstalls 2010 to call the 2013 install when it's complete.

The .bat idea would be one way to delay the task.  Put in a timeout, then call the Office 2013 install.

If you use the .bat, I'd suggest having the second task verify that Office 2010 is uninstalled before it runs the 2013 task.

Comments:
  • Do you have an idea of something that Kace does know completes successfully? If so I can just run whatever that thing is to stall for time. - itsamurai 9 years ago
    • it knows this over return codes, so drop a return code at the end of the .vbs - Nico_K 9 years ago
      • I tried adding this return code at the end of the vbs and it did not work:

        DIM returnValue
        returnValue = 99
        WScript.Quit(returnValue) - itsamurai 9 years ago
 
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