how to delete a registry entry?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by muab.

hi there =)

i know it was asked before (many times), but wasnt able to find any answer =(

how could i delete a single entry from the registry (under win2000)?

thx
muaB
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

check out this winapi function:

RegDeleteKey_(hKey, Key)

hKey can be :

#HKEY_CLASSES_ROOT
#HKEY_CURRENT_USER
#HKEY_LOCAL_MACHINE
#HKEY_USERS

key is a string of the key you want to delete.

Note: keys cannot be deleted if they have subkeys, i.e. all subkeys must be deleted before the main key.

P.S. this is untested and quickly copied from the api docs!

--Kale

In love with PureBasic! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Jose.

Another way would be to use the library mentioned in this posting;
viewtopic.php?t=2894

see the web page link.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by muab.
Originally posted by Kale

check out this winapi function:

RegDeleteKey_(hKey, Key)
ummm.. this one would work, but not for entries =(

to make it easier:

i want to let my app to be started automatically with windows (this works), but of course want it to be able to delete this entry again.

thx in advance
muaB
Post Reply