Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I verify the completion of an .msi installation?

Posted on 2006-07-11
2
Medium Priority
?
235 Views
Last Modified: 2013-12-03
Hi experts.

I am developing an html application that will be used to install a number of different programs.  On a page will be a list of programs that will need to be installed.  I have already used a jscript that checks for specific registry entries, determining if any of the programs have already been installed.  If a program has been installed, a check mark image is made visible next to the name of the program.

If a program has not been installed, the user will see an install button.  Clicking on that will then run the normal installer (usually an .msi).  After the installer completes successfully, I would like to put a check mark next to the name of the program.  How can I verify within the hta file that the external installer has completed?  Is there a script I can run that will wait for a process to complete? I would like to stick with jscript, but any solution that accomplishes this will do.

Thanks!!!
0
Comment
Question by:pwi11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 17083907
Check out http://www.microsoft.com/technet/scriptcenter/resources/scriptshop/shop0805.mspx#EOE ("Using Win32_ProcessStartTrace to Handle Process Events") and in particular the paragraph

Listing 3: Asynchronously monitor specific processes with Win32_ProcessStartTrace

On Error Resume Next

strComputer = "."
arrTargetProcs = Array("calc.exe", "notepad.exe", "freecell.exe")

Set SINK = WScript.CreateObject("WbemScripting.SWbemSink","SINK_")

Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
objWMIService.ExecNotificationQueryAsync SINK, _
 "SELECT * FROM Win32_ProcessStartTrace"

Wscript.Echo "Waiting for target processes ..."

Do
   WScript.Sleep 10000
Loop

'******************************************************************************

Sub SINK_OnObjectReady(objLatestEvent, objAsyncContext)

For Each strTargetProc In arrTargetProcs
  If LCase(objLatestEvent.ProcessName) = LCase(strTargetProc) Then
    Wscript.Echo VbCrLf & "Process Name: " & objLatestEvent.ProcessName
    Wscript.Echo "  Process ID: " & objLatestEvent.ProcessID
    Wscript.Echo "  Time: " & Now
  End If
Next

End Sub


seems to do what you want.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 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