CharLower(szLCUninstallFilenameLongBuf); CharLower(szLCUninstallFilenameShortBuf);
void ClearWinRegUninstallFileDeletion(void){  char  *szPtrIn  = NULL;  char  *szPtrOut = NULL;  char  szInMultiStr[MAX_BUF];  char  szOutMultiStr[MAX_BUF];  char  szLCKeyBuf[MAX_BUF];  char  szLCUninstallFilenameLongBuf[MAX_BUF];  char  szLCUninstallFilenameShortBuf[MAX_BUF];  char  szWinInitFile[MAX_BUF];  char  szTempInitFile[MAX_BUF];  char  szWinDir[MAX_BUF];  DWORD dwOutMultiStrLen;  DWORD dwType;  BOOL  bFoundUninstaller = FALSE;  if(!GetWindowsDirectory(szWinDir, sizeof(szWinDir)))    return;  wsprintf(szLCUninstallFilenameLongBuf, "%s\\%s", szWinDir, sgProduct.szUninstallFilename);  GetShortPathName(szLCUninstallFilenameLongBuf, szLCUninstallFilenameShortBuf, sizeof(szLCUninstallFilenameShortBuf));  CharLower(szLCUninstallFilenameLongBuf);  CharLower(szLCUninstallFilenameShortBuf);  if(gSystemInfo.dwOSType & OS_NT)  {    ZeroMemory(szInMultiStr,  sizeof(szInMultiStr));    ZeroMemory(szOutMultiStr, sizeof(szOutMultiStr));    dwType = GetWinReg(HKEY_LOCAL_MACHINE,                       "System\\CurrentControlSet\\Control\\Session Manager",                       "PendingFileRenameOperations",                       szInMultiStr,                       sizeof(szInMultiStr));    if((dwType == REG_MULTI_SZ) && (szInMultiStr != '\0'))    {      szPtrIn          = szInMultiStr;      szPtrOut         = szOutMultiStr;      dwOutMultiStrLen = 0;      do      {        lstrcpy(szLCKeyBuf, szPtrIn);        CharLower(szLCKeyBuf);        if(!strstr(szLCKeyBuf, szLCUninstallFilenameLongBuf) && !strstr(szLCKeyBuf, szLCUninstallFilenameShortBuf))        {          if((dwOutMultiStrLen + lstrlen(szPtrIn) + 3) <= sizeof(szOutMultiStr))          {            /* uninstaller not found, so copy the szPtrIn string to szPtrOut buffer */            lstrcpy(szPtrOut, szPtrIn);            dwOutMultiStrLen += lstrlen(szPtrIn) + 2;            /* there are actually 2 NULL bytes between the strings */            szPtrOut          = &szPtrOut[lstrlen(szPtrIn) + 2]; /* there are actually 2 NULL bytes between the strings */          }          else          {            bFoundUninstaller = FALSE;            /* not enough memory; break out of while loop. */            break;          }        }        else          bFoundUninstaller = TRUE;        szPtrIn = &szPtrIn[lstrlen(szPtrIn) + 2];              /* there are actually 2 NULL bytes between the strings */      }while(*szPtrIn != '\0');    }    if(bFoundUninstaller)    {      if(dwOutMultiStrLen > 0)      {        /* take into account the 3rd NULL byte that signifies the end of the MULTI string */        ++dwOutMultiStrLen;        SetWinReg(HKEY_LOCAL_MACHINE,                  "System\\CurrentControlSet\\Control\\Session Manager",                  TRUE,                  "PendingFileRenameOperations",                  TRUE,                  REG_MULTI_SZ,                  szOutMultiStr,                  dwOutMultiStrLen,                  FALSE,                  FALSE);      }      else        DeleteWinRegValue(HKEY_LOCAL_MACHINE,                          "System\\CurrentControlSet\\Control\\Session Manager",                          "PendingFilerenameOperations");    }  }  else  {    /* OS type is win9x */    wsprintf(szWinInitFile, "%s\\wininit.ini", szWinDir);    wsprintf(szTempInitFile, "%s\\wininit.moz", szWinDir);    if(FileExists(szWinInitFile))    {      if(UpdateFile(szWinInitFile, szTempInitFile, szLCUninstallFilenameLongBuf))        CopyFile(szTempInitFile, szWinInitFile, FALSE);      DeleteFile(szTempInitFile);    }  }}