c# run Process with administrator mode

         //........................
   if (sYazilacakPath == "") { return; }
   Process p = new Process();
   p.StartInfo.FileName = sYazilacakPath;
   p.StartInfo.Arguments = "";
   p.StartInfo.UseShellExecute = false;
   p.StartInfo.CreateNoWindow = true;
   p.StartInfo.RedirectStandardOutput = true;
   p.StartInfo.Verb = "runas";
   p.Start();
   p.WaitForExit();
   //.....................

Yorumlar