home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / UNREG.CPP < prev    next >
C/C++ Source or Header  |  1997-02-28  |  1KB  |  37 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\condefs.h>
  3. #include <vcl\registry.hpp>
  4.  
  5. #pragma hdrstop
  6. //---------------------------------------------------------------------------
  7. USERES("Unreg.res");
  8. //---------------------------------------------------------------------------
  9. int main(int argc, char **argv)
  10. {
  11.     TRegistry *Registry;
  12.     Registry = new TRegistry;
  13.     Registry->RootKey = HKEY_LOCAL_MACHINE;
  14.     System::AnsiString myString = "\\software\\borland\\VCL Class Organizer";
  15.     if(Registry->KeyExists(myString))
  16.        {
  17.        if (Registry->DeleteKey(myString))
  18.            {
  19.            ::MessageBox(0,"Successfully deleted keys!","Status",MB_OK);
  20.            }
  21.            else
  22.            {
  23.            ::MessageBox(0,"Error deleting keys!","Status",MB_OK);
  24.            }
  25.        }
  26.        else
  27.        {
  28.        ::MessageBox(0,"Keys do not exist!","Status",MB_OK);
  29.        }
  30.  
  31.  
  32.     delete Registry;
  33.     return 0;
  34. }
  35. //---------------------------------------------------------------------------
  36.  
  37.