ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Executable functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Starts running a remote program from the current application. This application can be run by using a specific user account. This application must have no interface.
Remark: The program started remotely will not be able to access the network.
Example
// Start a remote application (advanced use)
AppToStart is Process
AppToStart.Executable = "myapp.exe"
AppToStart.CommandLine = "/SILENT"
AppToStart.ExecutionLogin = "DOMAIN\USER"
AppToStart.ExecutionPassword = "mypassword"
 
ExeRemoteRun(AppToStart, exeReturnValue, "COMPUTER2")
WHILE AppToStart.ExecutionInProgress = True
Wait(100)
END
 
Trace(AppToStart.ReturnValue)
Syntax

Starting a remote application with the current user account Hide the details

<Result> = ExeRemoteRun(<Command line> , <Element to return> , <Address of Remote Computer> [, <Username> [, <Connection password>]])
<Result>: Integer
Corresponds to the information requested by <Element to return>:
  • if the exeReturnValue constant was specified, <Result> corresponds to the return code specified by the RETURN statement.
  • if the exePID constant was specified, <Result> corresponds to the identifier of process of application run (PID).
<Command line>: Character string
Command line to run. The specified application must be installed on the remote computer. The paths used in this command line must be valid on the remote computer.
<Element to return>: Integer constant
Configures the function result:
exePIDThe current program and the launched program run in parallel. <Result> corresponds to the identifier of created process (also called PID) if the executable was successfully run, 0 if an error occurred.
exeReturnValueThe current program resumes its execution when the program run is over. <Result> is the return value of the executable.

Caution: The remote application must be run in less than one hour. Otherwise, the value returned after an hour will be 0.
<Address of Remote Computer>: Character string
IP address of server in xxx.xxx.xxx.xxx format (returned by NetIPAddress) or name of server (returned by NetMachineName).
<Username>: Optional character string
Username that will be used to connect to the remote computer. This parameter has the following format: "Domain\User".
The current user account is used if this parameter is not specified.
<Connection password>: Optional character string
Password associated with <Username>.
This parameter is mandatory if <Username> is specified.

Starting a remote application (advanced use) Hide the details

<Result> = ExeRemoteRun(<Process> , <Element to return> , <Address of Remote Computer> [, <Username> [, <Connection password>]])
<Result>: Integer
Corresponds to the information requested by <Element to return>:
  • if the exeReturnValue constant was specified, <Result> corresponds to the return code specified by the RETURN statement.
  • if the exePID constant was specified, <Result> corresponds to the identifier of process of application run (PID).
<Process>: Process variable
Process variable used to describe the characteristics of the application to run.
<Element to return>: Integer constant
Configures the function result:
exePIDThe current program and the launched program run in parallel. <Result> corresponds to the identifier of created process (also called PID) if the executable was successfully run, 0 if an error occurred.
exeReturnValueThe current program resumes its execution when the program run is over. <Result> is the return value of the executable.

Caution: The remote application must be run in less than one hour. Otherwise, the value returned after an hour will be 0.
<Address of Remote Computer>: Character string
IP address of server in xxx.xxx.xxx.xxx format (returned by NetIPAddress) or name of server (returned by NetMachineName).
<Username>: Optional character string
Username that will be used to connect to the remote computer. This parameter has the following format: "Domain\User".
The current user account is used if this parameter is not specified.
<Connection password>: Optional character string
Password associated with <Username>.
This parameter is mandatory if <Username> is specified.
Component: wd290std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help