プロセスで管理者権限で実行したいのですcmd
が、ポップアップが開き、WindowStyle
非表示に設定されています。
ProcessInfo = new ProcessStartInfo("cmd.exe", "/c " + @"cscript.exe DTCSECURITY.vbs");
ProcessInfo.CreateNoWindow = true;.
ProcessInfo.WindowStyle = ProcessWindowStyle.Hidden;
// Here with i pass the privillage
ProcessInfo.UserName = @"administrator";
ProcessInfo.Password = StringToSecureString("password12$");
process = Process.Start(ProcessInfo);
process.WaitForExit();
しかし、特権コードにコメントすると、ポップアップが点滅しません。