LabVIEW Cannot Launch On-Screen Keyboard Application on Windows 10 64-bit

Updated Aug 17, 2023

Reported In


  • LabVIEW

Issue Details

I need to programmatically launch Windows On-Screen Keyboard (OSK) application from my LabVIEW VI, thus I am using System Exec VI to call osk.exe, as shown below:

However, when running this VI on Windows 10 64-bit from LabVIEW 32-bit, either nothing happens with no error (and On-Screen Keyboard is not launched), or I am getting the following error:

Could not start On-Screen Keyboard

How can I fix this error?


The problem is related to using 32-bit LabVIEW on a 64-bit Operating System, due to Windows File System Redirector: LabVIEW cannot call 64-bit version of osk.exe since LabVIEW is a 32-bit application

You could try to call Wow64DisableWow64FsRedirection function in your LabVIEW VI in order to disable file system redirection and then call osk.exe application.
In order to achieve this, you should implement the following steps:

  1. Insert Call Library Function Node in your LabVIEW block diagram and configure it to call Wow64DisableWow64FsRedirection function of kernel32.dll as shown below:​

  2. Use System Exec VI to call osk.exe
  3. Use Call Library Function Node and configure it to call Wow64RevertWow64FsRedirection function of kernel32.dll to restore file system redirection

  4. Set VI properties (Ctrl+I)>>Execution>>Preferred Execution System as 'user interface'.

Your LabVIEW code will be as displayed below:

Additional Information

LabVIEW controls are not native Windows controls and it is important to remember that LabVIEW is a cross-platform programming tool. As such, automatic controls such as maximising and minimizing of this keyboard executable will need additional actions to access the executable's run time position in the window. This may be possible through calling the API of the target executable however, this will vary between executables on whether this capability is available.

In case you are receiving an Error 2 (memory full) when using the System Exec VI in LabVIEW, you should execute the command prompt window first with the following command:

cmd /c

Thus, command line input of System Exec VI should be set to cmd /c  osk.exe