From 27d70397b261699897f389e89f9c92764ebebb7e Mon Sep 17 00:00:00 2001 From: flier268 Date: Thu, 27 Oct 2022 16:08:25 +0800 Subject: [PATCH] fix: Tabtip.exe require admintrstor permission --- Osklib/Windows10OnScreenKeyboardController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Osklib/Windows10OnScreenKeyboardController.cs b/Osklib/Windows10OnScreenKeyboardController.cs index 0765046..3b66aba 100644 --- a/Osklib/Windows10OnScreenKeyboardController.cs +++ b/Osklib/Windows10OnScreenKeyboardController.cs @@ -36,9 +36,11 @@ public override bool IsOpened() private static void StartTabTip() { - ProcessStartInfo psi = new ProcessStartInfo(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe") + ProcessStartInfo psi = new ProcessStartInfo(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe")) { - UseShellExecute = true + CreateNoWindow = true, + UseShellExecute = false, + Arguments = "/c \"C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe\"" }; var p = Process.Start(psi);