How to list Startup Programs
<p>this works.</p>

<p>all startup programs in Software\Microsoft\Windows\CurrentVersion\Run</p>

<pre><code>        RegistryKey HKCU = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run");
        foreach (string Programs in HKCU.GetValueNames())
        {
            string GetValue = HKCU.GetValue(Programs).ToString();
            Console.WriteLine(getFilePath(GetValue)); //Environment.NewLine
        }
        HKCU.Close();
</code></pre>

<p>and this not.</p>

<p>all startup programs in HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run</p>

<pre><code>   RegistryKey key = Registry.LocalMachine.OpenSubKey("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run");
            foreach (string Programs in key.GetValueNames())
            {
                string GetValue = key.GetValue(Programs).ToString();
                Console.WriteLine(getFilePath(GetValue));
            }
</code></pre>

<p>Please note; I have admin rights, Ihave an 32bit OS and also is my app settings.</p>
