Hi everybody,
is there any way to shutdown windows 10 from Control RTE? For example, a simple button when I press it, shutdown windows.
Best regards
Ok, I found the solution in this post:
https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/
Anyway, thank you.
For other users, this is the code I use with Control RTE SL to shutdown windows.
VAR xShutdown: BOOL; Result: RTS_IEC_RESULT; END_VAR
IF xShutdown THEN SysProcess.SysProcessExecuteCommand('shutdown -s -t 1', ADR(Result)); xShutdown := FALSE; END_IF
And that's all.
Log in to post a comment.
Hi everybody,
is there any way to shutdown windows 10 from Control RTE?
For example, a simple button when I press it, shutdown windows.
Best regards
Ok, I found the solution in this post:
https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/
Anyway, thank you.
For other users, this is the code I use with Control RTE SL to shutdown windows.
And that's all.
Best regards
Last edit: John Martin 2022-05-08