I need to read/write some information in the Windows registry from my BHO. On Windows Vista/7, I create a new key under HKEY_CURRENT_USER\Software\AppDataLow\Software. This works fine, even in protected mode.
However, it does not work on XP. I tried to change the registry to HKEY_CURRENT_USER\Software\Classes\Software or HKEY_CURRENT_USER\Software, no luck.
What is the right registry key to use on Windows XP from a BHO?
IEGetWriteableHKCU does not exist on Windows XP, it was first added in Windows Vista
Before Vista you will have to use a different approach... during installation of the BHO you need to tell Windows/IE which key(s) you want to be writable from the BHO...
There is a whole API family to handle this (supported from WinXP SP2 and up according to MSDN):
IERegisterWritableRegistryKey
is used at installation timeIERegisterWritableRegistryValue
is used at installation timeIERegCreateKeyEx
is used at runtimeIERegSetValueEx
is used at runtime