としてのVisual Studioを実行した後に上昇を必要と私は私のWinフォームアプリケーションからOSKを実行して、サイズを変更しようとしていますが、私はこのエラーを取得しています:要求された操作をしても管理者
The requested operation requires elevation.
私は管理者としてのVisual Studioを実行しています。
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