Solved

VB Script Check for active process.

Posted on 2006-11-29
3
712 Views
Last Modified: 2010-08-05
Hello Experts

Could someone help me with a script issue. Down bellow i have a script for run a installation with higher privileges. I want a function for checking that msiexec is running and not end the script until msiecexe.exe process is shutdown.

Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:ad\lcladmin ""msiexec /i c:\zentest\zfdagent.msi /qb!"""
WScript.Sleep 100
oShell.Sendkeys "Password~"
WScript.Quit

Thanks

Mattias
0
Comment
Question by:kihl71
3 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18046231
Not sure if this will work with "runas"...

You could try the Exec() method instead so that you can poll the running state:
http://msdn2.microsoft.com/en-us/library/ateytk4a.aspx

The example in the above link shows how to loop until the app is complete.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question