Shutdown Windows from Control RTE SL

2022-05-08
2022-05-08
  • John Martin

    John Martin - 2022-05-08

    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

     
  • John Martin

    John Martin - 2022-05-08

    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.

    Best regards

     

    Last edit: John Martin 2022-05-08

Log in to post a comment.