From target start Win OnScreenKeyboard

dmb-fan
2026-10-27
2026-10-29
  • dmb-fan - 2026-10-27

    Hi !
    I am get crazy....
    I try to start osk.exe from Visu or PLC.
    From Visu I can't load it, always error (It change from programm execute always to load receipe ..!?!?)
    From PLC always freeze of PLC,

    • I allowed the win service of the PLC the data exchange between desktop and service
    • I allowed in ..user.cfg [SysProcess] Command=AllowAll
      Shutdown with SysProcessExecuteCommand works, but 'osk.exe' or the complete path always crashed the system.
      And like always: No documentation. Just guessing. Or know somebody more and have a link for me?
      THANKS !
     
  • TimvH

    TimvH - 2026-10-28

    Check the CODESYS log. Do you see something like this?:

    2026-10-28T14:27:50.602Z: Cmp=SysFile, Class=2, Error=39, Info=4, pszInfo=!!!! Access denied to 'C:/Windows/System32/osk.exe' due to ForceIecFilePath
    2026-10-28T14:27:50.602Z: Cmp=SysFile, Class=1, Error=0, Info=0, pszInfo= To grant access, this path may be configured as a PlaceholderFilePath

    PS, if you give an irritating, or annoying or blaming answer, I will never try to help you again.


    Some additional info... do you run the Control Win as user, or as service. Test it first by running it as a user, else check the info that Claude gave me as suggestion (not tested):

    Watch out: the keyboard may not appear

    CODESYS Control Win normally runs as a Windows service. Windows keeps services in a separate, invisible session (session 0). The command then succeeds, but nobody sees the keyboard. You can check this in Task Manager: if osk.exe runs under the user SYSTEM, this is the cause.

    A reliable workaround uses the Windows Task Scheduler:

    Create a task named ShowOSK that starts C:\Windows\System32\osk.exe with β€œRun only when user is logged on” checked. That option makes it open on the user’s desktop.
    Have the PLC start that task instead of osk.exe:
    iecst
    sApp := 'C:\Windows\System32\schtasks.exe';
    sArgs := 'schtasks /run /tn "ShowOSK"';

    The command line usually repeats the program name as the first argument.

    1. Whitelist it in the config: Command.1=C:\Windows\System32\schtasks.exe
     

    Last edit: TimvH 2026-10-28
  • dmb-fan - 2026-10-29

    Thanks, but today morning it works on random base. (from Target Visu directly). After a few attemps I found the problem:
    The button for the keyboard is on the Master-Frame. And it works on every single Visu-Screen, but NOT on the Start-Visu! (But there is a short flash on the bottom of the screen...)
    And of course I tested the whole time with the Start-Visu. Now I copy the Bitmap-Button on the Start Screen OVER the Frame Bitmap, too and it works. So I think its a bug...
    For me works this: in the visu for the element
    Input-Config >> OnMouseUp >> ExecuteClientProgram >> 1. Parameter = 'osk.exe'

     

Log in to post a comment.