Jump to content

Win10 OSK launch not working via script

Recommended Posts


Can someone with win10 test this and see which, if any, works for them please? None is working for me, but if I go in the System32 folder and click on the osk.exe it will launch. Going into the sysWOW64 folder and clicking on the osk.exe presents an error that says "Could not start on screen keyboard". That error is also presented with the shellexecute call in the below script.


$1 = Run(@WindowsDir & "\System32\osk.exe")
MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @CRLF & '$1' & @CRLF & @CRLF & 'Return:' & @CRLF & $1) ;### Debug MSGBOX
$2 = Run(@WindowsDir & "\SysWOW64\osk.exe")
MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @CRLF & '$2' & @CRLF & @CRLF & 'Return:' & @CRLF & $2) ;### Debug MSGBOX
$3 = Run(@SystemDir & "\osk.exe")
MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @CRLF & '$3' & @CRLF & @CRLF & 'Return:' & @CRLF & $3) ;### Debug MSGBOX
$4 = ShellExecute("osk.exe")
MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @CRLF & '$4' & @CRLF & @CRLF & 'Return:' & @CRLF & $4) ;### Debug MSGBOX




Share this post

Link to post
Share on other sites

Thanks. I right clicked the file and ran as 64bit and only the shellexecute worked. I don't know which osk it actually launched. I guess this means the only way for this to work is if I compile my full app as 64bit? I hope the rest of my app works. At worst I guess I could have my app launch a hidden app compiled as 64bit that actually launches the osk.

What I don't understand is:

1/ If I put a full path with/out the macros and with/out and #reqadmin, why doesn't it work regardless of it being compiled as 64bit? The path is the path, no?

2/ Why when I go to the start menu and click the osk it actually launches the osk in the system32 folder even though I'm running 64bit machine which I would think would launch the osk in sysWOW64?


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