Skip to content
⌘ NSIS Forum Archive

Deleting registry keys for all users

3 posts

Lucky75#

Deleting registry keys for all users

Hi all,

I have an application that sets keys in both HKCU (when set through the program) and by default in HKLM on install.

When I am uninstalling the application, I need to delete not only the current user's key and the one in LM, but also the keys for other users. Is there a way to do this in NSIS?

Thanks 🙂
Lucky75#edited
Thanks!

How do I use it though, and where do I get it from/include it?

Edit:

I found a nsh on the internet,. but I would have thought it would be included already? Not too sure if I'm doing this correctly.


${EnumUsersReg} DeleteFromAllUsers temp.key

Function DeleteFromAllUsers
pop $0
DeleteRegKey HKU "$0\Software\${SOFTWARE_KEY}"
DetailPrint "Removing Software Key from: $0"
FunctionEnd