ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV 2025 feature!
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Command functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Executes a command in console mode. This command must have been defined by a variable of type Command.
Example
// Execute the command 'C:\Path\MyProgram.exe -opt1=val1'
// Define the command
MyCommandToExecute is Command
// Executable to run
MyCommandToExecute.Executable = "C:\Path\MyProgram.exe"
// Arguments to pass to the executable
MyCommandToExecute.Arguments = "Argument1"
// Open streams
MyCommandToExecute.Streams = cmdStandardInput + cmdStandardOutput
// Add an argument to the command line
CmdAddArgument(MyCommandToExecute, "Argument2")
// Add an option to the command line
CmdAddOption(MyCommandToExecute, "opt1", "val1")

// Execute command 
CmdExecute(MyCommandToExecute, False)
Syntax
<Result> = CmdExecute(<Command to execute> [, <Blocking>])
<Result>: Boolean
  • True if the command was run,
  • False otherwise.
<Command to execute>: Command variable
Name of the Command variable corresponding to the command to be executed in console mode.
<Blocking>: Optional boolean
  • True (default) to block the application until the command finishes executing.
  • False to let the application run without waiting for the command to finish executing.
Business / UI classification: Business Logic
Component: wd300std.dll
Minimum version required
  • Version 2025
Comments
Click [Add] to post a comment

Last update: 01/30/2025

Send a report | Local help