이 내용은 고객님의 설정 언어로 확인할 수 없습니다

이 내용은 다른 사용 가능한 언어로 표시됩니다. 고객님께서 사용하시는 브라우저에 텍스트 번역에 도움이되는 기능이 포함되어 있을 수 있습니다.

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

Updated Aug 17, 2023

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:​


     
  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