3

I have created a c# WPF application. I would like to run it automatically when Windows starts and/or when the user logs on by using the Windows registry. I don't have problems with my code, because when I set the path in the registry manually it won't work too.

Also the next topics won't help me further:

How do I set a program to launch at startup

How to run a C# application at Windows startup?

Autorun the Application using C#

However, I found out that when my application is located in the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run\ key it will startup automatically when I log on. But actually I read elsewhere (on the MSDN website) I just could put it into the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key but this doesn't work for me. However, other applications in those last key paths will startup..

I don't prefer the WOW6432Node one, becuase it's based on 64-bit systems and maybe the customers doesn't have a 64-bit system, so I prefer using the other key paths but I can't get it work.

Does someone know how to fix this? And why my application is starting in the WOW6432Node one and not the other key paths?

I also checked my Event Viewer log but I never found any errors, the application won't run. Also the application is enabled in the Task Manager startup tab, so that's not the problem.

Kelvin
  • 31
  • 2
  • `Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run` works perfectly for me as i'm currently working on an app that launches itself at start up. check the path to the exe that is stored there – Alex Aug 09 '17 at 07:08
  • 1
    Hmm.. that's weird it's not working for me (64-bit system). The application uses admin privileges, this is no problem in the WOW6432Node. I have the correct path to my exe. – Kelvin Aug 09 '17 at 07:39
  • @Kelvin I am facing the same problem. Had/How you fixed the issue? – Naveen Kumar V Sep 21 '21 at 09:28

0 Answers0