Advertisement
Guest User

Untitled

a guest
Dec 28th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Process proc = new Process();
  2.  
  3. proc.StartInfo.Domain = "YourDomain";
  4. proc.StartInfo.UserName = "Username";
  5. proc.StartInfo.Password = "YourPassword";
  6.  
  7. Process proc = new System.Diagnostics.Process();
  8. System.Security.SecureString ssPwd = new System.Security.SecureString();
  9. proc.StartInfo.UseShellExecute = false;
  10. proc.StartInfo.FileName = "C:/YourPath/YourProcess.exe";
  11. proc.StartInfo.Arguments = "Args"; //Arguments if any, otherwise delete this line
  12. proc.StartInfo.Domain = "domainname";
  13. proc.StartInfo.UserName = "username";
  14. proc.StartInfo.Password = "password";
  15. proc.Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement