system()

Read(268) Label: system command, execute,

Description:

It is used to call the system command, and return the result once completed. For example, to open the bat and exe file.

Syntax:

system(cmd/sh)

Note:

It is presently only allowed to execute one cmd command each time. To execute multiple cmds , you will need to write them into a bat file, and use a cmd to call the bat file.

Parameters:

cmd

The standard format of cmd parameter is  cmd /c +command”(Windows).

sh

The standard format of sh parameter is  sh -c +command” (Linux).

Option:

@p

Proceed with the execution without pause

Return value:

Return the corresponding result

Example:

system("cmd /C D:\\MicroInsight\\esCalc\\bin\\startup-zh.bat")

system("cmd /C D:\\MicroInsight\\DataLogic\\bin\\DataLogic.exe")

system("sh -c /test.sh")