• 2k
  • 13
  • 2.2k

C# Application not loading on Win 10

Nov 6 2018 3:28 AM


I have written a C# WinForm application. I have put the .exe in the Program Files (x86) folder.

Later in the registry "COMPUTER\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS\CURRENTVERSION\RUN" I have put my application

Value Name : ABC

Value Data : "C:\Program Files(x86)\ABC\ABC.EXE"

  1. RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"true);   
  2.                         rk.SetValue("ABC""\""+ Application.ExecutablePath + "\"" ); 
This works perfectly fine on Win 7. The application loads on startup. However in Win 10 this does not seem to load on startup.

Is there any chemical change to registry in Win 10 for applications to load on startup ? Where am I heading wrong..??

1. User Access Control is turned off on Win 10

2. I have also tried "Current User" instead of "Local Machine" both seem to revolt from working.

Thanks for trying to help.

Answers (4)