Does anyone know how to remove the HKEY_CURRENT_USER registry keys for all users on Windows 7? I need to remove all the registry keys for our product during uninstall. There could be many users using the product, each having registry entries under HKEY_CURRENT_USER. I need to do this from the uninstall script (InstallShield), but if I can do it from C++ or C#, I can probably call the code in a dll during uninstall.
Basically you need to Enum though all of the sub-keys in HKEY_USERS, looking for the specific path you want to delete.
I don't know if Installscript can do this, but I've done in it in a C++ custom action dll before. Look at this MSDN link it describes how you could do it in general. You'll need to sequence the custom action correctly for it to have the permissions required to access and delete in everyone's CU hive.