In Windows systems, Setup can be obtained in registry HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall, and XP, Vista, Win7 And Win8 are all the same
Open Registry command: Regedit, expand the registry path above, and the installer list is as follows:
To obtain a list of system setup programs:
Get System Installer List BOOL Cmylistctrltestdlg::allregkey (hkey hkey, LPCTSTR szdeskeyitem) {hkey hsubkey;
DWORD dwindex = 0;
Long lresult;
int i = 1; LRESULT = RegOpenKeyEx (hkey, Szdeskeyitem, 0, Key_read, &hsubkey);
Open the registry if (Error_success = = lresult) {TCHAR szkeyname[256] = {0};
DWORD cbname = 256*sizeof (TCHAR); LRESULT = RegEnumKeyEx (Hsubkey, Dwindex, Szkeyname, &cbname, 0, NULL, NULL, NULL); Get field while (lresult = error_success && lresult!= error_more_data) {OutputDebugString (sz
KEYNAME);
CString str; Str.
Format (_t ("%d"), I); i = M_mylist.insertitem (i, str);
Insert to list control to display M_mylist.setitemtext (i,1,szkeyname); Dwindex = dwindex + 1;
Change dwindex, loop get down field cbname = 256*sizeof (TCHAR); LRESULT = RegEnumKeyEx (Hsubkey, Dwindex, Szkeyname, &Amp;cbname, 0, NULL, NULL, NULL);
i++; } regclosekey (Hsubkey);
Close registry return TRUE;
} regclosekey (Hsubkey);
return FALSE; }