0

I have a script. It's not working. Without UserName and password everything is good. And must the logMessage show me "1" or not because of Secure type? LogMessage shows me just a "System.Security.SecureString" now.

pass = new System.Security.SecureString;
pass.AppendChar("1");
LogMessage(pass);
proc = new System.Diagnostics.Process;
proc.StartInfo.Username = "temp";
proc.StartInfo.Password = pass;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.FileName = "notepad.exe";
proc.Start();
Mike K
  • 63
  • 1
  • 7
  • 1
    I'd assume you need to call `LogMessage(pass.ToString())` or equivalent. I doubt the LogMessage function knows what to do with a SecureString object type – Grambot Jun 05 '18 at 12:48
  • It's not working. But logmessage is not my priority. My main aim is run "notepad.exe" – Mike K Jun 06 '18 at 04:12

0 Answers0