How to finish the process "osk.exe" in Unity3D? Or, why can I do that in Visual Studio but not Unity3D?

I want to input text by on screen keyboard in GUI, and I draw a GUI.TextField. Then, I wish osk.exe invoked when the textfield gets the focus(using System.Diagnostics.Process.Start() in C#), and close osk.exe when the focus losts.

There’s problem when closing osk.exe, I tried ways below:
(1) directly call the instance’s method Process.Kill(), or
(2) find osk by Process.GetProcessesByName("osk"), then call Process.Kill()

These were infeasible in Unity3D, but feasible in Visual Studio. And when getting all processes by Process.GetProcess(), I found the difference between Unity3D and Visual Studio, Unity3D just got parts of all process, and the osk process wasn’t included. Is there kind of system privilege problem?

Thank you for your tolerance about my English.:slight_smile:

Problem solved.

I build an exe by Visual Studio, in which to close the osk.exe process, then Unity3D closed osk.exe through this exe.

Since this exe has more privilege about system, it works.