leandroct - 2019-02-05

I want to open an executable file via Codesys (3.5 SP13). I installed the SysOS23 library (3.5.13.0) in my Codesys ControlWin program. I have tried all the instructions available in this library, and all instructions open the program, but without opening the program window. That is, only in Task Manager you can see that the program has been opened.

I tried to open the .EXE file using the "ExecutePlcProgram" in a Button, but it had the same behaviour.
I tried to embed the EXE file in the program without success too.

How do I make the application window to open?

PROGRAM POU
VAR
CRODA: BOOL;
Result: DINT;
Teste2: UDINT;
Resultado: POINTER TO UDINT;
END_VAR

IF CRODA THEN
Result := (pszCommand:= 'C:\Windows\Notepad.exe');
Teste2 :=
(pszComand:= 'C:\Windows\Notepad.exe', pResult:= Resultado);
SysCreateProcess(pszCommandLine:= 'C:\Windows\Notepad.exe', bHide:= FALSE);
SysCreateProcess(pszCommandLine:= 'C:\Windows\Notepad.exe', bHide:= TRUE);
CRODA := FALSE;
END_IF

IMG: Task Manager.png