PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Used to find out whether a 32-bit application is already run.
Notes:
  • 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.
  • To use this function in Windows NT/2000, the PSAPI.DLL library must be found on the system.
Versions 16 and later
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server code This function is used to find out whether an executable is run on the server. Caution: the rights to handle this executable will be the ones of the current Internet user.
New in version 16
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server code This function is used to find out whether an executable is run on the server. Caution: the rights to handle this executable will be the ones of the current Internet user.
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server code This function is used to find out whether an executable is run on the server. Caution: the rights to handle this executable will be the ones of the current Internet user.
Example
WINDEVReports and QueriesUser code (UMC)
NbRun is int
NbRun = ExeRunning("C:\WINDEV\PROGRAMS\WINDEV.EXE")
IF NbRun > 0 THEN
Info("You are using WINDEV!")
END
Windows Mobile
NbRun is int
NbRun = ExeRunning("Calc.EXE")
IF NbRun > 0 THEN
Info("You are using the calculator!")
END
Syntax

Finding out whether the specified executable is run Hide the details

<Result> = ExeRunning([<Executable Name>])
<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 (with quotes)
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. If the executable is the name of a 16-bit application, <Result> will be 0.
Windows Mobile Name of the executable (up to 260 characters).
If this parameter contains the full path of the executable, this path is ignored. Only the name of the executable is taken into account.
If this parameter is not specified, the current executable is used.
Caution: The executable must be a 32-bit application. If the executable is the name of a 16-bit application, <Result> will be 0.

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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Video Exemplo ExeRun
https://youtu.be/_MqM-jTn3XQ
amarildo
Oct. 26 2018
Verificar se Este programa está Aberto
Verificar se Este programa está Aberto

//Verificar se Este programa está Aberto
IF ExeRunning(ExeInfo(exeName))>1 THEN
Info("Este Programa já está aberto ")
EndProgram(True) // Fechar Programa
END
//Verificar se o programa uninfe.exe está aberto
n_executa is int=0
n_executa=ExeRunning("E:\_2014_SSD\Programas\UniNFe\uninfe.exe")
IF n_executa>0 THEN
Info("Uninfe já Aberto")
ELSE
Info("Uninfe não aberto - vou abrir")
ExeRun("E:\_2014_SSD\Programas\UniNFe\uninfe.exe")
END

//Blog Com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-funcoes-exe-windows-008.html
https://www.youtube.com/watch?v=qPyq9sXmRkE
De matos AMARILDO
Aug. 13 2016