내가 실행하고 내의 WinForm 응용 프로그램에서 OSK 크기를 조정하려고하지만 난이 오류를 얻고으로 비주얼 스튜디오를 실행 한 후 고도가 필요합니다요청한 작업도 관리자
The requested operation requires elevation.
내가 관리자로 비주얼 스튜디오를 실행하고 있습니다.
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = "c:\\windows\\system32\\osk.exe";
process.StartInfo.Arguments = "";
process.StartInfo.WorkingDirectory = "c:\\";
process.Start(); // **ERROR HERE**
process.WaitForInputIdle();
SetWindowPos(process.MainWindowHandle,
this.Handle, // Parent Window
this.Left, // Keypad Position X
this.Top + 20, // Keypad Position Y
panelButtons.Width, // Keypad Width
panelButtons.Height, // Keypad Height
SWP_SHOWWINDOW | SWP_NOZORDER); // Show Window and Place on Top
SetForegroundWindow(process.MainWindowHandle);
그러나
,System.Diagnostics.Process.Start("osk.exe");
작품 잘하지만 늘 나에게 당신이 원하는 일을에서 당신을 금지합니다 키보드
"릴리스"모드로 실행 해 보셨습니까? 즉, 귀하의 프로그램을 실행 exe? 관리자로 exe를 실행하려면'startInfo.Verb = "runas";' – Sunil