Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process proc = new Process();
- System.Security.SecureString ssPwd = new System.Security.SecureString();
- string password = "SomePassword";
- for (int x = 0; x < password.Length; x++)
- {
- ssPwd.AppendChar(password[x]);
- }
- ProcessStartInfo StartInfo = new ProcessStartInfo
- {
- FileName = "Translink.exe",
- WorkingDirectory = @"C:Program FilesWestern UnionUniversal-Release",
- UserName = "someuser",
- Domain = "somedomain",
- Password = ssPwd,
- UseShellExecute = false,
- RedirectStandardOutput = true,
- RedirectStandardError = true
- };
- proc = Process.Start(StartInfo);
- proc.WaitForExit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement