X11
  ddd: Ddd
  libX11_6: OrgX11 core library
  xinit: X.RogX server initializer

Select required packages

SDK download:
  http://msdn.microsoft.com/en-us/windows/ff851942

gedit download:
  http://ftp.gnome.org/pub/gnome/binaries/win32/gedit/


  http://en.wikipedia.org/wiki/Microsoft_Help_2

Source code

/*
 * showsoft.c
 * Written by D Kuenz on 6-26-11
 * This program displays all of the DisplayNames that it discovers
 * under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
 */


/* enumerate #defines */
#define WIN32_LEAN_AND_MEAN

#define DISPLAY_NAME TEXT("DISPLAYNAME")
#define MAX_KEY_LENGTH 255
#define MAX_VALUE 255
#define MAX_VALUE_NAME 16383
#define UNINSTALL_SUBKEY TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")



/* enumerate #includes */
#include 
#include 
#include 
#include 


/* Table of Contents (enumerate prototypes) */
char *crcstrncat(char *dest, char *source, unsigned max);
char *crcstrtoupper(char *str);
int main(int argc, char** argv);
void queryKey(TCHAR *name);


/* concatenate two strings and store result limited to a maximum size */
char *crcstrncat(char *dest, char *source, unsigned max)
{
  unsigned i;

  i = max - strlen(dest) - 1;
  if (i > 0) {
    strncat(dest, source, i);
    dest[max - 1] = 0;
  }
  return dest;
}


/* destructively change a string to upper case */
char *crcstrtoupper(char *str)
{
  unsigned i;

  for (i=0; str[i]; i++) {
    str[i] = toupper(str[i]);
  };

  return str;
}


/* display a list of installed software products */
int main(int argc, char** argv)
{
  DWORD i, retCode;
  HKEY  hKey;
  char* keyName;
  TCHAR name[MAX_KEY_LENGTH + 1];
  char* subKeyName;

  keyName = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall");

  DWORD    subKeyNameLen;               // size of name string 
  TCHAR    class[MAX_PATH] = TEXT("");  // buffer for class name 
  DWORD    classLen = MAX_PATH;         // size of class string 
  DWORD    subKeyCount=0;               // number of subkeys 
  DWORD    subKeyMaxLen;                // longest subkey size 
  DWORD    classMaxLen;                 // longest class string 
  DWORD    valueCount;                  // number of values for key 
  DWORD    valueNameMaxLen;             // longest value name 
  DWORD    valueDataMaxLen;             // longest value data 
  DWORD    securityDescriptor;          // size of security descriptor 
  FILETIME lastWriteTime;               // last write time 

//  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, UNINSTALL_SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {

    // Get the class name and the value count. 

    retCode = RegQueryInfoKey(
      hKey,                 // key handle 
      class,                // buffer for class name 
      &classLen,            // size of class string 
      NULL,                 // reserved 
      &subKeyCount,         // number of subkeys 
      &subKeyMaxLen,        // longest subkey size 
      &classMaxLen,         // longest class string 
      &valueCount,          // number of values for this key 
      &valueNameMaxLen,     // longest value name 
      &valueDataMaxLen,     // longest value data 
      &securityDescriptor,  // security descriptor 
      &lastWriteTime);      // last write time 
 
    // Enumerate the subkeys, until RegEnumKeyEx fails.

    if (retCode == ERROR_SUCCESS) {
      subKeyName = malloc(subKeyMaxLen + 1);
      if (subKeyName) {
        for (i = 0; i < subKeyCount; i++) {
          subKeyNameLen = subKeyMaxLen + 1;
          if (RegEnumKeyEx(hKey, i, subKeyName, &subKeyNameLen, 0, 0, 0, &lastWriteTime) == ERROR_SUCCESS) {
            strncpy(name, keyName, MAX_KEY_LENGTH);
            crcstrncat(name, TEXT("\\"), MAX_KEY_LENGTH);
            crcstrncat(name, subKeyName, MAX_KEY_LENGTH);
            queryKey(name);
          }
        }
      }
      free(subKeyName);
    }
    RegCloseKey(hKey);
  }
  return 0;
}


/* given a subkey, seek and display the value of DisplayName, if any */ 
void queryKey(TCHAR *name) 
{ 
  HKEY  hKey;                           // key handle
  DWORD i;                              // index
  DWORD retCode;                        // return code

  /* input/output variables specifically used by RegQueryInfoKey */
  TCHAR    class[MAX_PATH] = TEXT("");  // buffer for class name 
  DWORD    classLen = MAX_PATH;         // size of class string 
  DWORD    subKeyCount=0;               // number of subkeys 
  DWORD    subKeyMaxLen;                // longest subkey size 
  DWORD    classMaxLen;                 // longest class string 
  DWORD    valueCount;                  // number of values for key 
  DWORD    valueNameMaxLen;             // longest value name 
  DWORD    valueDataMaxLen;             // longest value data 
  DWORD    securityDescriptor;          // size of security descriptor 
  FILETIME lastWriteTime;               // last write time 

  /* input/output variables specifically used by RegEnumValue */
  TCHAR valueName[MAX_VALUE_NAME + 1];  // value name 
  DWORD valueNameLen;                   // length of value name
  DWORD type;                           // data type of value
  TCHAR value[MAX_VALUE + 1];           // value
  DWORD valueLen;                       // length of value

  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, name, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {

    /* Get the value count */

    retCode = RegQueryInfoKey(
      hKey,                 // key handle 
      class,                // buffer for class name 
      &classLen,            // size of class string 
      NULL,                 // reserved 
      &subKeyCount,         // number of subkeys 
      &subKeyMaxLen,        // longest subkey size 
      &classMaxLen,         // longest class string 
      &valueCount,          // number of values for this key 
      &valueNameMaxLen,     // longest value name 
      &valueDataMaxLen,     // longest value data 
      &securityDescriptor,  // security descriptor 
      &lastWriteTime);      // last write time 
 
    // Enumerate the subkeys, until RegEnumKeyEx fails.

    if (retCode == ERROR_SUCCESS) {

      // Enumerate the key values. 

      if (valueCount) {
        for (i = 0, retCode = ERROR_SUCCESS; i < valueCount; i++) { 
          valueLen = MAX_VALUE_NAME; 
          valueNameLen = MAX_VALUE_NAME; 
          value[0] = '\0'; 
          valueName[0] = '\0'; 

          retCode = RegEnumValue(
            hKey,          // key handle 
            i,             // index initialized to 0 and incremented for subsquent
            valueName,     // receives subkey name
            &valueNameLen, // receives subkey name size included terminating null 
            NULL,          // reserved 
            &type,         // receives data type
            value,         // receives data for value entry
            &valueLen);    // specifies size of data area, receives size of data
          
          if (strncmp(DISPLAY_NAME, crcstrtoupper(valueName), sizeof(DISPLAY_NAME)) == 0) { 
            _tprintf(TEXT("%s\n"), value);
          }
        }
      } 
    }
    RegCloseKey(hKey);
  } 
}