handle.exe というプロセスに C# 経由で複数のコマンド ライン引数を渡す必要があります: http://www.google.com.mt/search?sourceid=chrome&ie=UTF-8&q=handle.exe
まず、ADMINISTRATOR 権限を使用して実行可能ファイルを実行する必要があります。この投稿はまさにそれを達成するのに役立ちました: vista、c# で cmd.exe を管理者としてプログラムで実行します。
しかし、「-p explore」などの実際の行引数を呼び出す次の問題が発生します。
コマンドライン引数を一緒に、または連続して指定するにはどうすればよいですか?
現在のコードは次のとおりです。
Process p = new Process();
ProcessStartInfo processStartInfo = new ProcessStartInfo("filePath");
processStartInfo.CreateNoWindow = true;
processStartInfo.UseShellExecute = false;
processStartInfo.RedirectStandardOutput = true;
processStartInfo.RedirectStandardInput = true;
processStartInfo.Verb = "runas";
processStartInfo.Arguments = "/env /user:" + "Administrator" + " cmd";
p.StartInfo = processStartInfo;
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
Console.WriteLine(output);
ありがとう