Allows you to find out whether a 32-bit application is already run.
Remarks:
- If the executable is compiled in 64 bits, the function returns the status of a 64-bit process.
- If the executable is compiled in 32 bits, the function returns the status of a 32-bit process even if a 64-bit Windows is run.
Syntax
Finding out whether the specified executable is run Hide the details
<Result> = ExeRunning([<Executable name> [, <Option>]])
<Result>: Integer
- Number of instances of the executable currently run.
- 0 if the application is not started.
- -1 if a problem occurred. For example:
- The user has no sufficient rights to list the processes in memory.
- The application could not access the system DLL used to enumerate the processes.
<Executable name>: Optional character string
Name and full path of executable (up to 260 characters). In this case, <Result> returns the instances of this specific application.
Name of the executable (up to 260 characters). In this case, <Result> is the number of instances of the program (regardless of its initial path).
If this parameter is not specified, the current executable is used.
Caution: The executable must be a 32-bit application.
<Option>: Integer constant
Allows you to specify the type of instances to be counted: | |
sysAllUsers | Counts the instances of the executable launched by all users. |
sysCurrentUser | Counts the instances of the executable launched by the current user. Caution: If the process that calls ExeRunning was started by the user and involves an elevation of privileges, this constant is equivalent to the sysAllUsers constant. |
Finding out whether the specified PID is run Hide the details
<Result> = ExeRunning(<Executable PID>)
<Result>: Integer
- 1 if the application is started.
- 0 if the application is not started.
<Executable PID>: Integer
PID (Process Identifier) of the executable.