Posts: 129
Threads: 38
Joined: May 2006
How do you delete a registry key?
For example, I want to delete "settings" under "Sofware\Gindi\QM2"
I am not saying I will delete that key, just and example, since there are no subkeys
Thank you!!!!
Posts: 12,073
Threads: 140
Joined: Dec 2002
rset "" "keytodelete" "software\gindi\qm2\user\parentkey" 0 -2
In older QM versions it would not delete keys containing subkeys (bug). You can use this instead:
;does not use rset due to a bug in QM <= 2.1.8.4
dll shlwapi #SHDeleteKey hkey $pszSubKey
if(!RegOpenKeyEx(HKEY_CURRENT_USER "software\gindi\qm2\user\parentkey" 0 0x10000 &hk))
,SHDeleteKey hk "keytodelete"
,RegCloseKey hk
Note that with RegOpenKeyEx is used parent key, and with SHDeleteKey is used key that will be deleted.
Posts: 129
Threads: 38
Joined: May 2006
PURRRRRRRRRRRRFECT!!!!!!!!!!
TY TY TY YOUR HIGHNESS!!!!!!!!