Sys_WaitForProcessToExist
Description
Section titled “Description”Waits until a process with the specified name is running. The function checks every iIntervalSec seconds, for up to iMaxWaitSec seconds. The first check is made after iIntervalSec seconds.
Syntax
Section titled “Syntax”Sys_WaitForProcessToExist(sProcessExeName, iMaxWaitSec, iIntervalSec) As Boolean
Parameters
Section titled “Parameters”sProcessExeName (String)
Section titled “sProcessExeName (String)”File name of the process, for example CapaInstaller.exe
iMaxWaitSec (Integer)
Section titled “iMaxWaitSec (Integer)”Maximum number of seconds to wait. Must be equal to or larger than iIntervalSec.
iIntervalSec (Integer)
Section titled “iIntervalSec (Integer)”Number of seconds between each check
Return value
Section titled “Return value”If process does not exist after iMaxWaitSec the function will return false. The function also returns False if iMaxWaitSec is smaller than iIntervalSec.
gbValue is True if the process is running. giValue contains the number of seconds the function waited.
Example
Section titled “Example”If bStatus Then bStatus = Sys_WaitForProcessToExist("CapaInstaller.exe", 30, 5)Related functions
Section titled “Related functions”Sys_WaitForProcess Sys_Sleep Sys_KillProcess Sys_GetProcessOwner Sys_CompareProcessOwner Constants Package Property Variables