Guest User

Untitled

a guest
Oct 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. private void CreatePorts(string command, bool ports)
  2. {
  3. Process p = new Process();
  4.  
  5. p.StartInfo.WorkingDirectory = (Application.StartupPath + @"com0com");
  6. p.StartInfo.FileName = @"setupc.exe";
  7. p.StartInfo.UseShellExecute = false;
  8. p.StartInfo.RedirectStandardOutput = true;
  9. p.StartInfo.RedirectStandardInput = true;
  10. p.StartInfo.LoadUserProfile = true;
  11. p.StartInfo.Verb = @"runas";
  12. p.StartInfo.CreateNoWindow = true;
  13. p.StartInfo.Arguments = " " + command;
  14. p.Start();
  15. }
Add Comment
Please, Sign In to add comment