title: How to get list of all startup processes from Registry using C# on Windows 7 64 bit?
body: <p>Hi guys I have a strange issue.</p>
  <p>I am trying to get list of all startup programs from Registry - LocalMachine,CurrentUser, subkeys Run, RunOnce, RunOnceEx. And after that I can get list of links in Startup folder</p>
  <p>For Win64 I found that startup programs are in this key</p>
  <blockquote>
  <p>LocalMachine/Software/Wow6432Node/Microsoft/Windows/CurrentVersion/Run</p>
  </blockquote>
  <p>The problem is in this code, running it I get List of apps which are in different Subkey <strong>LocalMachine\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run</strong> instead of the described bellow <strong>LocalMachine\Software\Microsoft\Windows\CurrentVersion\Run</strong></p>
  <p>Is that normal?</p>
  <pre><code> Microsoft.Win32.RegistryKey key;
   key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot;, false);
  
   foreach (string appName in key.GetValueNames()) 
   {
        try
        {
           MessageBox.Show(appName);
        }
        catch (Exception ex) 
        {
                  
        }
        
   }
  </code></pre>
  <p>I tryed using this <a href="https://stackoverflow.com/questions/2775967/get-the-startup-list-via-wmi">WMI solution</a> but it didnt get all startup apps. That's why i decided to get them manually from the Registry.</p>
  <ol>
  <li><p>Is this script correct and why it doesn't do what it is supposed to do?</p>
  </li>
  <li><p>Is there any other way to get all startup apps and processes?</p>
  <p>Thanks</p>
  </li>
  </ol>