# Function Reference

ProcessExists

Checks to see if a specified process exists.

ProcessExists ( "process" )

Parameters

process | The name or PID of the process to check.

Return Value

Success: | Returns the PID of the process.
Failure: | Returns 0 if process does not exist.

Remarks

Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe"
PID is the unique number which identifies a Process.
In order to work under Windows NT 4.0, ProcessExists requires the file PSAPI.DLL (included in the AutoIt installation directory).
The process is polled approximately every 250 milliseconds.

Related

ProcessClose, ProcessWait, ProcessWaitClose, WinExists

Example

If ProcessExists("notepad.exe") Then
MsgBox(0, "Example", "Notepad is running.")
EndIf