Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.Diagnostics.Process proc = new System.Diagnostics.Process();
- System.Security.SecureString ssPwd = new System.Security.SecureString();
- proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
- proc.StartInfo.CreateNoWindow = false;
- proc.StartInfo.FileName = FindExecutable(cFileName);
- proc.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
- proc.StartInfo.Arguments = " C:\Ref doc 1.pdf";
- proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
- proc.StartInfo.Domain = "XXXX";
- proc.StartInfo.UserName = "Administrator";
- string password = "xxxxxx";
- for (int x = 0; x < password.Length; x++)
- {
- ssPwd.AppendChar(password[x]);
- }
- proc.StartInfo.Password = ssPwd;
- proc.StartInfo.UseShellExecute = false;
- proc.Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement