Jump to content

Recommended Posts

Posted (edited)


after doing some search upon the start issues for OSK.EXE I found several threads covering the nice 32bit/64bit filesystem redirection.


Searching the autoit help is bringing up this topic:




That one is telling:


This function is useful for 32-bit applications that want to gain access to the native system32 directory.
By default, WOW64 file system redirection is enabled.

This function may not work reliably when there are nested calls.
Therefore, this function has been replaced by the Wow64DisableWow64FsRedirection and Wow64RevertWow64FsRedirection functions.


But I cannot find any other topic in the help system covering this stuff?


BTW, this is working for me perfectly to keep OSK.EXE running all the time. Purpose is a tablet application, where some users tend to close OSK and to complain afterwards, that it vanished ;-)


Func OSKchecker()
    If ProcessExists("osk.exe") Then
        ; MsgBox(0,"kein OSK erkannt",$PIDosk)
        If (@OSArch = "X64") And (@AutoItX64 = 0) Then
            DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1) ;~ Turns On 64 Bit Redirection
            $PIDosk = ShellExecute("osk.exe")
            DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 0) ;~ Turns Off 64 Bit Redirection
            $PIDosk = ShellExecute("osk.exe")
EndFunc   ;==>OSKchecker


Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning
      I was trying to start the Virtual Keyboard of Windows from my script, but everytime I do the Shell from the script, a MsgBox appears to communicate that it's unable to start the virtual keyboard.

      I run AutoIt on Windows 10 64 bit, and If I double click on "osk.exe", located in C:\Windows\System32, it runs normally... If I try to launch it from my application ( or double click / launch from C:\Windows\SysWOW64 ), it tells me what I wrote above.

      This is the code I use to launch the Virtual Keyboard ( First, I see if the user has clicked on a checkbox and set the state to checked only, if so, I launch osk.exe ) :
      If Not (ProcessExists("osk.exe")) And GUICtrlRead($checkbox_DataAuditUtente) = $GUI_CHECKED Then Local $iEsitoAvvioTastiera = ShellExecuteWait($sFileTastieraVirtuale If $iEsitoAvvioTastiera == 0 Then MsgBox($MB_ICONERROR, "Errore!", "Errore durante l'avvio della tastiera virtuale." & @CRLF & "Errore: " & @error) Exit EndIf EndIf

      Any suggestions?