PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Allows you 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
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.

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.
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video Exemplo ExeRun
https://youtu.be/_MqM-jTn3XQ
amarildo
26 Oct. 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
13 Aug. 2016