# Sys_WaitForProcessToExist

> Searches for a specified process. If specified process does not exist the function will wait.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/system-functions/sys-waitforprocesstoexist/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Searches for a specified process. If specified process does not exist the function will wait. It will check every iIntervalSec at a max of iMaxWaitSec

### Syntax

Sys_WaitForProcessToExist(sProcessExeName, iMaxWaitSec, iIntervalSec) As Boolean

### Parameters

#### sProcessExeName (String)

Name of process

#### iMaxWaitSec (Integer)

Maximum wait time

#### iIntervalSec (Integer)

Interval for each process check

### Return value

If process does not exist after iMaxWaitSec the function will return false

### Example

**VBScript**

```vb
If bStatus Then bStatus = Sys_WaitForProcessToExist("CapaInstaller.exe", 30, 5)
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Sys_WaitForProcess](/capainstaller/vb-scripting-library/system-functions/sys-waitforprocess/) [Sys_Sleep](/capainstaller/vb-scripting-library/system-functions/sys-sleep/) [Sys_KillProcess](/capainstaller/vb-scripting-library/system-functions/sys-killprocess/) [Sys_GetProcessOwner](/capainstaller/vb-scripting-library/system-functions/sys-getprocessowner/) [Sys_CompareProcessOwner](/capainstaller/vb-scripting-library/system-functions/sys-compareprocessowner/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
