title: Powershell script but not making the changes required in registry
body: <pre><code>var processStartInfo = new ProcessStartInfo();
          processStartInfo.WorkingDirectory = @"c:\temp";
          processStartInfo.FileName = "cmd.exe";
          processStartInfo.UseShellExecute = false;
          processStartInfo.RedirectStandardInput = true;
          // set additional properties     
          Process proc = Process.Start(processStartInfo);
  
          //process.StandardInput.WriteLine("c:");
          proc.StandardInput.WriteLine("powershell -ExecutionPolicy Bypass c:\\temp\\autologin.ps1");
          proc.StandardInput.Close();
  </code></pre>
  
  <p>Powershell</p>
  
  <pre><code>$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"  
  Set-ItemProperty $RegPath "AutoAdminLogon" -Value "0" -type String  
  Set-ItemProperty $RegPath "DefaultUsername" -Value " " -type String  
  Set-ItemProperty $RegPath "DefaultPassword" -Value " " -type String
  </code></pre>
  
  <p>I've been trying to run a powershell script that my program writes. I can't just run the powershell commands in the program because I will be rebooting the computers and accessing that powershell program again. </p>
  
  <p>Any ideas? Currently it will run the commands but not make the changes to the registry but if i enter the commands myself into CMD it works perfectly. So I'm a little stuck the only thing I need is for C# to run that powershell script for me.</p>
  
  <p><code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon</code> reg keys for reference</p>
  
  <p><strong>NEW EDIT:</strong> program is executing but putting the registry keys in WOW6432Node </p>