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
Forces the termination of a running executable associated with a command.
New in version 2025
Note: This function is only available from version 2025 Update 1.
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)
...
IF CmdIsRunning(MyCommandToExecute) = True THEN
	CmdKill(MyCommandToExecute)
END
Syntax
CmdKill(<Command manipulated>)
<Command manipulated>: Command variable
Name of the Command variable corresponding to the command to be manipulated.
Remarks
You can force the termination of the executable associated with a command via the AutoTerminate property of a variable of type Command.
If the AutoTerminate property is set to False, you can:
  • determine if the executable is currently running, with CmdIsRunning.
  • force the termination of the executable, with CmdKill.
Business / UI classification: Business Logic
Component: wd300std.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/14/2025

Send a report | Local help