0

I am launching the touch keyboard in an administrator account from my application on a button press as follows :

 var progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
 var keyboardPath = Path.Combine(progFiles, "TabTip.exe");
 Process.Start(keyboardPath);

However from a non-admin account, the touch keyboard does not launch.

I have tried various techniques (using ShellExecuteEx, CreateProcessWithLogonW, impersonation etc) with no luck.

Is it possible to do this?

  • Is it WinForms, WPF, UWP ? – Tony Mar 24 '17 at 3:25
  • I guess the problem is that you don't have access to this directory. You could however copy the software into your app data folder (bin/debug or bin/release) – MetaColon Mar 24 '17 at 5:49
  • @Tony : WPF, worked fine on windows 8.1 for non admin account – JD. Mar 24 '17 at 16:20
  • Have you tried int oskID = System.Diagnostics.Process.Start( "osk" ).Id; And for close it: System.Diagnostics.Process.GetProcessById( oskID ).Kill(); – Tony Mar 24 '17 at 18:40
4

After lots of tests, I found : Show touch keyboard (TabTip.exe) in Windows 10 Anniversary edition

So the issues is with a bug in windows 10 Anniversary edition.

From that link I used the C# code:

    var uiHostNoLaunch = new UIHostNoLaunch();
    var tipInvocation = (ITipInvocation)uiHostNoLaunch;
    tipInvocation.Toggle(GetDesktopWindow());
    Marshal.ReleaseComObject(uiHostNoLaunch);


   [ComImport, Guid("4ce576fa-83dc-4F88-951c-9d0782b4e376")]
   class UIHostNoLaunch
   {
   }

   [ComImport, Guid("37c994e7-432b-4834-a2f7-dce1f13b834b")]
   [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
   interface ITipInvocation
   {
       void Toggle(IntPtr hwnd);
   }

   [DllImport("user32.dll", SetLastError = false)]
   static extern IntPtr GetDesktopWindow();
-2

"JD." said the answer to his question was "ITipInvocation.Toggle()". However, there are times in which this is not true.

In Win10 Ver 1803, DesktopMode, there is no reliable way to
toggle the "Touch Keyboard" on|off [ ITipInvocation.Toggle() ];
nor can you reliably discover if it's "up" ( on screen )
[ IFrameworkInputPane.Location() ]; both routines fail randomly.

Instead, ensure that "TabTIP.EXE" and "....InputApp.EXE"
only run when the keyboard is "up" ( on screen ); see:
https://stackoverflow.com/a/51376030/5732431

  • For future reference, just edit your original post. If there's any issues with undeleting it, raise a custom mod flag. – Yvette Colomb Jul 31 '18 at 5:18
  • Now that I understand the extent to which robots operate here, I shouldn't have any (major) problems in the future, @Yvette. – Jeff Relf Aug 6 '18 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.