Thread: Deleteing a key in the reg?

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    8

    Deleteing a key in the reg?

    or rather everything in:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\RunMRU
    ??? please thanks!

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    RegDeleteKey

    Deletes a subkey and it's values. You just keep hopping back and forth between CodeGuru and here with questions, meh.

  3. #3

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    69
    Code:
    #include <windows.h>
    
    int WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR, int)
    {
    	if(ERROR_SUCCESS == RegDeleteKey(HKEY_CURRENT_USER,
    		"Software\\Microsoft\\Windows\\CurrentVersion\\ Explorer\\RunMRU"))
    			MessageBox(NULL, "Regkey Deleted", "Information:", MB_OK);
    	return(0);
    }
    Take out the space in the string literal and it should be fine.

    Regards,
    Brian

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM