Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. var proc = new Process
  2. {
  3. StartInfo = new ProcessStartInfo
  4. {
  5. FileName = "cmd.exe",
  6. UseShellExecute = false,
  7. RedirectStandardOutput = true,
  8. RedirectStandardInput = true,
  9. CreateNoWindow = true
  10. }
  11. };
  12.  
  13. proc.Start();
  14. proc.StandardInput.WriteLine(delete
  15. ? "route delete " + ServiceIpAddress + " mask " + GatewayMask + " " + GatewayIpAddress + " -p" : "route add " + ServiceIpAddress + " mask " + GatewayMask + " " + GatewayIpAddress + " -p");
  16. roc.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement