Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

VBscript help - test if process is there if so wait


Recommended Posts

Posted

I am trying to install multiple bits of software using a vbscript

The code I have to date is as follows

Option Explicit

Dim strComputer, objNetwork, wshshell

Dim PCname

 

Set objNetwork = WScript.CreateObject("WScript.Network")

PCname = objNetwork.ComputerName

Set WshShell = WScript.CreateObject("WScript.Shell")

 

WshShell.Run "msiexec /i \\server\share\programname\setup.msi /quiet /log \\server\share\" & PCname & "\programlogfile.txt"

 

WScript.Quit

 

This works fine, but I want to add more programs to it, but I am very new to vbscript and I am after very simple code to get it working

 

What I would like is between each

 

WshShell.Run "msiexec /i \\server\share\programname\setup.msi /quiet /log \\server\share\" & PCname & "\programlogfile.txt"

 

I have a loop test that checks

is msiexec.exe process is running

if yes then wait 20000

if not run next command

 

Any ideas on a very simple solution?

 

thank you

  • Thanks 1

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



×
×
  • Create New...