How to get list of all startup processes from Registry using C# on Windows 7 64 bit ?
Hi guys I have a strange issue.

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

For Win64 I found that startup programs are in this key "LocalMachine/Software/Wow6432Node/Microsoft/Windows/CurrentVersion/Run".

The problem is in this code, running it I get List of apps which are in different Subkey **"LocalMachine\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"** instead of the described bellow **"LocalMachine\Software\Microsoft\Windows\CurrentVersion\Run"**

Is that normal?

     Microsoft.Win32.RegistryKey key;
     key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", false);
  
     foreach (string appName in key.GetValueNames()) 
     {
          try
              {
                MessageBox.Show(appName);
              }
          catch (Exception ex) 
              {
                    
              }
          
     }

I tryed using this [WMI solution][1] but it didnt get all startup apps. That's why i decided to get them manually from the Registry.

 

 1. Is this script correct and why it doesn't do what it is supposed to do?  
 2. Is there any other way to get all startup apps and processes?

 Thanks 


  [1]: http://stackoverflow.com/questions/2775967/get-the-startup-list-via-wmi
How to get list of all startup processes from Registry using C# on Windows 7 64 bit ?
===

Hi guys I have a strange issue.

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

For Win64 I found that startup programs are in this key "LocalMachine/Software/Wow6432Node/Microsoft/Windows/CurrentVersion/Run".

The problem is in this code, running it I get List of apps which are in different Subkey **"LocalMachine\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"** instead of the described bellow **"LocalMachine\Software\Microsoft\Windows\CurrentVersion\Run"**

Is that normal?

     Microsoft.Win32.RegistryKey key;
     key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", false);
  
     foreach (string appName in key.GetValueNames()) 
     {
          try
              {
                MessageBox.Show(appName);
              }
          catch (Exception ex) 
              {
                    
              }
          
     }

I tryed using this [WMI solution][1] but it didnt get all startup apps. That's why i decided to get them manually from the Registry.

 

 1. Is this script correct and why it doesn't do what it is supposed to do?  
 2. Is there any other way to get all startup apps and processes?

 Thanks 


  [1]: http://stackoverflow.com/questions/2775967/get-the-startup-list-via-wmi