Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
I have created a windows application. It logs machine events into database.
In the installer for the app, I had made changes such that an entry is made in Registry editor at the following path 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
This was done so that application triggers at startup.

But I have found that there are some cases when the application does not trigger on startup. Most of the times it does, but sometimes it doesn't
What could be the reason for this?? Is there anything else I am supposed to do to ensure the application triggers at startup??

What I have tried:

I have checked the registry editor and instead of finding the entry at 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run' I found it at 'HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run', which I guess is not an issue.
Most of the times the exe triggers, but sometimes it doesn't.
Posted
Comments
CHill60 8-Feb-16 11:23am    
Are you absolutely sure it is not starting at all, and not a case of starting and immediately crashing?
Ravi Bhavnani 8-Feb-16 11:48am    
Try writing to the event log (or write to a log file) when your app starts up. That will allow you to verify that your app is in fact not starting, vs. crashing right after startup.

/ravi

1 solution

The applications specified in the Run and RunOnce commands will not execute if Windows is started in Safe Mode.

It is also possible to prevent Windows from processing these keys through Group Policy or by editing the registry:
  • HKLM or HKCU
  • Path: Software\Microsoft\Windows\CurrentVersion\Policies
  • DWORD Values: (0 = enabled, 1 = disabled)

    • DisableLocalMachineRun
    • DisableLocalMachineRunOnce
    • DisableCurrentUserRun
    • DisableCurrentUserRunOnce
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Feb-16 14:21pm    
Useful information, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900