I have a 32-bit application that writes to:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
my application path so that it will be started when the current user logs on. This works fine on 32-bit systems (i.e. the application auto-starts).
I understand that on 64-bit systems, registry redirection comes into play. So, I searched for:
HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
but the CurrentVersion sub-key does not exist (the Wow6432Node key exists though)! So, I manually created it and my application wrote correctly to the registry (I went into the registry and checked. The entry was there). BUT, the application did not auto-start when the current user logged in. Can someone tell me why?
Btw, all this is fine if I use the HKEY_LOCAL_MACHINE branch. But, I want this to be user-specific.
Why am I not just using the Startup folder?
When UAC is enabled and set to always notify, this simply does not work (i.e. my application does not auto-start). And no, I cannot disable UAC. I require that my application play nice with UAC enabled and set to always notify.
If someone can tell me why, I will gladly forget my need to use the registry (I hate the registry).
Fallback option (last resort):
I will use the Task Scheduler APIs to do this. But, I will do this only when there is absolutely no other way.
Thanks!
\CurrentVersion\Runin the registry. - Captain ObvliousHKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Runin a 64-bit OS? Does the registry key exist and it is not being launched or is the registry key not written? - Steve