Sys_ExistProcess
Description
Section titled “Description”Checks if a process with the specified name or process ID is running. The name isn’t case-sensitive.
The function only checks the first 500 running processes. On computers with many processes, for example Remote Desktop servers, a running process can be missed.
Syntax
Section titled “Syntax”Sys_ExistProcess(sProcessExeName, bMustExist) As Boolean
Parameters
Section titled “Parameters”sProcessExeName (String)
Section titled “sProcessExeName (String)”File name of the process, for example notepad.exe, or a process ID
bMustExist (Boolean)
Section titled “bMustExist (Boolean)”If True, the function returns False when the process isn’t running
Return value
Section titled “Return value”Result will be stored in gbValue: True if the process is running, otherwise False.
Example
Section titled “Example”If bStatus Then bStatus = Sys_ExistProcess("CapaInstaller.exe", False)If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)Related functions
Section titled “Related functions”Sys_WaitForProcess Sys_Sleep Sys_KillProcess Sys_GetProcessOwner Sys_CompareProcessOwner Constants Package Property Variables