Update cookies preferences
Promotic

CreateProcess - method of the Pm object

Description:
Launching the program (*.exe, *.com, *.bat) without waiting for the termination.
Syntax:
Boolean CreateProcess(String sCmdLine, String sCurrent)
Parameters:
sCmdLine(String) Name and path to the started file ([disk:][path]program[extension] [parameter1] [parameter2] [...])
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files or folders.
sCurrent(String) Current folder for the started program (current folder of the PROMOTIC application is ".").
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files or folders.
Return value:
true - If the program has been started.
false - If the program hasn't been started.
Note:
- After calling this method (after launching the program) an algorithm continues (it doesn't wait for the termination of thus started program).
- To terminate the external program the Pm.WndOper method can be used.


This method is not functional in Web panels.
See also:
- Pm.ShellExecute (method)
Example1:
Launching the Windows OS program "Calculator". It is not necessary to enter the complete path to calc.exe because this program is located in Windows system folder (in "/Windows/System32").
JavaScriptVBScriptSelect and copy to clipboard

Pm.CreateProcess("calc.exe", ".");
Example2:
Opening a web browser with the specified web address.
JavaScriptVBScriptSelect and copy to clipboard

Pm.CreateProcess("explorer https://www.promotic.eu", ".");
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- CreateProcess
 
 
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.