This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to launch two process in the same time?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Aug 23, 2013
02:18 AM
How to launch two process in the same time?
Hi,
I want to ask how to launch two processes(auctually 2 batch files) on the same time?
What's more, I have to check if both processes are finished.
How can I do that?
Thanks!
I want to ask how to launch two processes(auctually 2 batch files) on the same time?
What's more, I have to check if both processes are finished.
How can I do that?
Thanks!
(1) Reply
Oct 04, 2013
01:41 PM
You could consider launching your applications asynchronously (not waiting for completion), either through LaunchApplication, or CA Launch Application.
After they are launched, you could have a CA vbscript action to check through the processes until they both are finished (not found in process list).
i.e. Detecting if a process is still running...
Dim objWMIService, colProcessList
Dim iReturn
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name LIKE '' Or Name LIKE ''")
For Each objProcess in colProcessList
InfoMessage "Process '" & objProcess.Name & "' is still running"
Next
InfoMessage is a logging function I call to log information, you would need to add logic to keep looping to wait until completion, but that could get you a little further.
After they are launched, you could have a CA vbscript action to check through the processes until they both are finished (not found in process list).
i.e. Detecting if a process is still running...
Dim objWMIService, colProcessList
Dim iReturn
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name LIKE '
For Each objProcess in colProcessList
InfoMessage "Process '" & objProcess.Name & "' is still running"
Next
InfoMessage is a logging function I call to log information, you would need to add logic to keep looping to wait until completion, but that could get you a little further.
joychen wrote:
Hi,
I want to ask how to launch two processes(auctually 2 batch files) on the same time?
What's more, I have to check if both processes are finished.
How can I do that?
Thanks!