I have a utility that I've written in which I want the option to launch automatically with system startup. A much older version of this app (written when XP was still current) simply created a shortcut to itself in the Startup folder on the current user's start menu. With the advent of Vista this wasn't possible anymore.
I recently rewrote the program so that it'll work on Vista, Win7, Win8, Win10, Server 2008, 2012 & 2016. Rather than writing a shortcut to the start menu, I'm putting an entry in the registry (under HKCU\Software\Microsoft\Windows\CurrentVersion\Run) which points to the executable. The app also requests elevation in order to get the necessary permission to write to the registry.
The problem is that now, every time the system is restarted I get two instances of my app.
I've searched the registry to see if there might be an extra entry that I've inadvertently created and all I managed to find was a handful of MUI references, the Run entry that I'm creating under HKCU and another under HKU (which I'm assuming is under the GUID for HKCU).
Any suggestions as to why I'm getting multiple instances on startup would be greatly appreciated.
I recently rewrote the program so that it'll work on Vista, Win7, Win8, Win10, Server 2008, 2012 & 2016. Rather than writing a shortcut to the start menu, I'm putting an entry in the registry (under HKCU\Software\Microsoft\Windows\CurrentVersion\Run) which points to the executable. The app also requests elevation in order to get the necessary permission to write to the registry.
The problem is that now, every time the system is restarted I get two instances of my app.
I've searched the registry to see if there might be an extra entry that I've inadvertently created and all I managed to find was a handful of MUI references, the Run entry that I'm creating under HKCU and another under HKU (which I'm assuming is under the GUID for HKCU).
Any suggestions as to why I'm getting multiple instances on startup would be greatly appreciated.