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

Updated Apr 24, 2018

Reported In

Software

  • 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?
 

Solution

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:​
  1. use System Exec VI to call osk.exe
  2. use Call Library Function Node and configure it to call Wow64RevertWow64FsRedirection function of kernel32.dll to restore file system redirection

Your LabVIEW code will be as displayed below:

Additional Information

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
 

WAS THIS ARTICLE HELPFUL?

Not Helpful