Skip to main content

Execute-Command-Line

Command Description

Execute the system command line, and return the text output by the console during the execution of the command line

Command Prototype

sRet = Sys.Command(sCommand)

Parameter Description

ParameterRequiredTypeDefaultDescription
sCommandTruestring""The command(s) to execute

return

sRet,The variable used to save the output of the command.

Demo

/************************************Execute command line************ ************************ 
Command prototype:
sRet = Sys.Command ("")
Input parameters:
sCommand--command line to execute
Outgoing parameters:
sRet--the result after the command is run
********************************************************************************/
Dim sCommand="ipconfig"
sRet = Sys.Command(sCommand)
TracePrint (sRet)