Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect end of of .exe

Status
Not open for further replies.

furtivevole

Technical User
Jun 21, 2001
84
0
0
GB
I am using a proprietary script to launch a series of software installations chosen by the user from a menu. The installations are done through either msiexec.exe or setup.exe. It is vital that one installation has completely finished before the next begins. However, some of them have other processes embedded whose behaviour cannot always be predicted - such as external database access right at the end - which mean that say just setting a timer or searching for the new registry uninstall key, won't work. I looked into Windows Scripting Host run method, but then discovered that the proprietary script doesn't support WSH.


How could I detect the real end of .exe with a Windows API call?

Many thanks


 

Somethink like this?

Brian

Code:
lcProcess ="MyEXE"

loWMISrv = Getobject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
colProcessList = loWMISrv.ExecQuery("Select * from Win32_Process")
For Each loProcess In colProcessList
   IF loProcess.name = lcProcess
     * then keep waiting
   ENDIF
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top