Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //кодируем пароль
- string password = "Test";
- SecureString secureString = new SecureString();
- foreach (char chr in password) secureString.AppendChar(chr);
- Process pr = new Process();
- pr.StartInfo.UseShellExecute = false;
- pr.StartInfo.FileName = @"C:Users" + userName + @"DocumentsDLL2.bat";
- pr.StartInfo.Verb = "runas";
- pr.StartInfo.UserName = "admin";
- pr.StartInfo.Domain = "os";
- pr.StartInfo.Password = secureString;
- pr.Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement