+ Reply to Thread
Results 1 to 3 of 3

Thread: How to delete all the registry entries of a given key?

  1. #1

    How to delete all the registry entries of a given key?

    I am MFC developer.

    How to delete all the registry entries of a given key?

    I also want to delete all the sub-keys under it?

    Please help.

  2. #2
    Use SHDeleteKey WIN32 API.

    It deletes the specified key and all its sub-keys.

    For more information:
    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

    Code:
    void DeleteKeyWithSubkeys()
    {
    	SHDeleteKey(HKEY_CURRENT_USER, "Software\\MySoftware") ;
    }

  3. #3
    Great, it worked.

    Thanks.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts