Jump to content

Registry


Recommended Posts

The following code will check to see if a named key exists in the registry and if it is found to exist then it is deleted.

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Key")

If @error = 0 Then 
  RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Key")
Else 
  ;Whatever
EndIf

Is that what you wanted ? Your question wasnt really worded all that particularly well. :)

Edited by nova
Link to comment
Share on other sites

Have you tried writing a function yet, or are you just begging for code? Just as Larry said you will need to use RegEnumKey, RegEnumVal, and RegDelete. I would look at Larry's FileSearch as it will do things quite similar to what you are doing except it uses File* functions instead of registry... this makes it rather simple to tweak to what you need.

I don't expect anyone to handout such a large function... if you want it done write it yourself and if you feel that it is useful then share it. It is pathetic how many people come out to these forums and expect everyone else to write them code... learn the language and do it yourself!

*** Matt @ MPCS

EDIT: It appears Holger has already provided you with a solution that will work... just encapsulate the code posted in that thread in a function and you will have what you are looking for.

Edited by Matt @ MPCS
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...