From target start Win OnScreenKeyboard

dmb-fan
2 days ago
16 hours ago
  • dmb-fan - 2 days ago

    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 - 16 hours ago

    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.
    3. Whitelist it in the config: Command.1=C:\Windows\System32\schtasks.exe

     

    Last edit: TimvH 16 hours ago

Log in to post a comment.