PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Runtime mode of program
  • Keywords of API "VerQueryValue" function
  • Running the function in test mode in Windows
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
Retrieves the specified information about the version of an executable or DLL.
PHP Retrieves the specified information about the version of a module.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 22 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindows MobilePHPAjaxUser code (UMC)
ProgVersion is string
ProgVersion = ExeInfo(exeVersion, "Appli.exe")
IF ProgVersion <> "2.0A" THEN
Error("Invalid program version")
END
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)
// Retrieve the application name (without the full path)
ProgName = ExeInfo("OriginalFilename", "App.exe")
// The executable was not renamed
ProgName = fExtractPath(ExeInfo(exeName), fFileName + fExtension)
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)
sExeDir is string
IF InTestMode() = True THEN
// In test mode, return the runtime directory
sExeDir = fCurrentDir()
ELSE
sExeDir = ExeInfo(exeDirectory)
END
Syntax
<Result> = ExeInfo(<Keyword> [, <Executable Name>])
<Result>: Character string
  • Requested information.
  • Empty string ("") if there is no information or if the function failed.
<Keyword>: String constant
Information to retrieve:
exeCopyrightCopyright of program
LinuxAndroidAndroid Widget iPhone/iPadUniversal Windows 10 AppJavaPHP This constant is not available.
exeDescriptionDescription supplied with the program
Java Version of JRE (Java Runtime Environment) with which the current application is run.
AndroidAndroid Widget Android version used to run the application (for example: 4.1). We recommend that you use sysAndroidVersion.
Universal Windows 10 AppPHP This constant is not available.
Linux This constant only operates with the PC SOFT libraries or executables.
Versions 18 and later
AndroidAndroid Widget exeLaunch
AndroidAndroid Widget iPhone/iPad exeLaunch
New in version 18
AndroidAndroid Widget exeLaunch
AndroidAndroid Widget iPhone/iPad exeLaunch
AndroidAndroid Widget exeLaunch
AndroidAndroid Widget iPhone/iPad exeLaunch
AndroidAndroid Widget Mode for starting the Android application.
AndroidAndroid Widget iPhone/iPad Mode for starting the Android or iOS application.
If this constant is specified, <Result> can correspond to:
  • empty string ("") if the application was manually started by the user.
  • AndroidAndroid Widget the exeStartup constant if the application was automatically started by the system, when starting the device.
  • Versions 19 and later
    the exePushNotification constant if the application was automatically started by the system further to the reception of a push notification.
    New in version 19
    the exePushNotification constant if the application was automatically started by the system further to the reception of a push notification.
    the exePushNotification constant if the application was automatically started by the system further to the reception of a push notification.
  • Versions 23 and later
    the exeInBackground constant if the application was started in background (detection of group of Beacons or during geo-localization tracking).
    New in version 23
    the exeInBackground constant if the application was started in background (detection of group of Beacons or during geo-localization tracking).
    the exeInBackground constant if the application was started in background (detection of group of Beacons or during geo-localization tracking).
  • Versions 21 and later
    the exeGeoTracking constant if the application was started in background when managing the geo-localization tracking. See Geo-localization tracking for more details.
    This constant is kept for backward compatibility from version 230050. It is equivalent to the exeInBackground constant.
    New in version 21
    the exeGeoTracking constant if the application was started in background when managing the geo-localization tracking. See Geo-localization tracking for more details.
    This constant is kept for backward compatibility from version 230050. It is equivalent to the exeInBackground constant.
    the exeGeoTracking constant if the application was started in background when managing the geo-localization tracking. See Geo-localization tracking for more details.
    This constant is kept for backward compatibility from version 230050. It is equivalent to the exeInBackground constant.
exeModeMode of program: compiled in 16, 32 or 64 bits, DOS program, etc.
AndroidAndroid Widget JavaPHP This constant is not available.
Linux This constant returns an empty string ("").
exeNameName and full path of executable.
PHP Name of runtime module or name of project if the module corresponds to a page or if <Executable Name> is not specified.
AndroidAndroid Widget Java Name of Java archive for the application currently run.
exeDirectoryDirectory of executable (without the final \ but with the ":")
AndroidAndroid Widget JavaPHP This constant is not available.
exeVersionVersion of specified module.
PHP Version of runtime module or version of module for page generation if the module corresponds to a page or if <Executable Name> is not specified.
Linux This constant only operates with the PC SOFT libraries or executables.
AndroidAndroid Widget Java Version number of application.
Universal Windows 10 App This constant is not available.
Versions 15 and later
exeVersionWindowsFormat
New in version 15
exeVersionWindowsFormat
exeVersionWindowsFormat
Version of specified module in standard Windows format ("14.0.204.98" for example).
WEBDEV - Server codeLinuxAndroidAndroid Widget iPhone/iPadUniversal Windows 10 AppJavaPHP This constant is not available.
exeCompanyName entered for the company when creating the executable.
LinuxiPhone/iPadUniversal Windows 10 AppPHP This constant is not available.
<Executable Name>: Optional character string
Name and full (or relative) path of executable or module used (up to 260 characters). If this parameter is not specified, the current executable is used.
Windows Mobile No relative path can be used.
PHP Name and full (or relative) path of file (up to 260 characters). If this parameter is not specified, the current module is used.
AndroidAndroid Widget Java This parameter must not be specified.
Universal Windows 10 App This parameter must necessarily be specified.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

Runtime mode of program

To find out the runtime mode of program, use the exeMode constant:
ProgMode = ExeInfo(exeMode)
The function result can correspond to:
  • "16" if the Windows program is compiled in 16 bits,
  • "32" if the Windows program is compiled in 32 bits,
  • "64" if the Windows program is compiled in 64 bits,
  • "DOS" if the program is a DOS program,
  • an empty string ("") if the program is not an executable.
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileAjaxUser code (UMC)

Keywords of API "VerQueryValue" function

The <Keyword> parameter can be replaced by one of the keywords used by the API "VerQueryValue" function:
"Comments" "LegalTrademarks"
"CompanyName" "OriginalFilename"
"FileDescription" "PrivateBuild"
"FileVersion" "ProductName"
"InternalName" "ProductVersion"
"LegalCopyright" "SpecialBuild"
WINDEV

Running the function in test mode in Windows

When running ExeInfo in test mode from WINDEV, the information given about the current executable is the one regarding "WDTst", the test engine of WINDEV (found in the "Programs" sub-directory of WINDEV setup directory).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo ExeInfo
//Versão desse programa
s_versao_programa is string=""
s_versao_programa=ExeInfo(exeVersion)

//Versão do programa matos_utilitarios.exe
s_versao_programa=ExeInfo(exeVersion,"D:\erpmatos\matos_utilitarios\matos_utilitarios.exe")

//Versão do programa matos_utilitarios.exe 32 ou 64
s_versao_programa=ExeInfo(exeMode,"D:\erpmatos\matos_utilitarios\matos_utilitarios.exe")

//Versão do programa matos_utilitarios.exe - pegar diretorio e nome

s_versao_programa=ExeInfo(exeName,"D:\erpmatos\matos_utilitarios\matos_utilitarios.exe")

//Versão do programa matos_utilitarios.exe - pegar nome diretorio
s_versao_programa=ExeInfo(exeDirectory,"D:\erpmatos\matos_utilitarios\matos_utilitarios.exe")

//Blog com Video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/06/curso-windev-funcoes-exe-windows-005.html
https://www.youtube.com/watch?v=m5wOrLUt9Ik

De matos AMARILDO
Jun. 02 2016