ProcessWindowsMessages();
void SaveInstallerFiles(){  int       i;  char      szBuf[MAX_BUF];  char      destInstallDir[MAX_BUF];  char      destInstallXpiDir[MAX_BUF];  char      szMFN[MAX_BUF];  char      szArchivePath[MAX_BUF];  DWORD     dwIndex0;  siC       *siCObject = NULL;  GetSaveInstallerPath(destInstallDir, sizeof(destInstallDir));  AppendBackSlash(destInstallDir, sizeof(destInstallDir));  CreateDirectoriesAll(destInstallDir, ADD_TO_UNINSTALL_LOG);  /* copy the self extracting file that spawned setup.exe, if one exists */  if((*sgProduct.szAlternateArchiveSearchPath != '\0') && (*sgProduct.szParentProcessFilename != '\0'))  {    FileCopy(sgProduct.szParentProcessFilename, destInstallDir, FALSE, FALSE);    /* The dir for xpi files is .\xpi because the self-extracting     * .exe file will automatically look for the .xpi files in a xpi subdir     * off of the current working dir. */    _snprintf(destInstallXpiDir, sizeof(destInstallXpiDir), "%sxpi\\", destInstallDir);    destInstallXpiDir[sizeof(destInstallXpiDir) - 1] = '\0';    CreateDirectoriesAll(destInstallXpiDir, ADD_TO_UNINSTALL_LOG);  }  else  {    /* Else if self extracting file does not exist, copy the setup files */    /* First get the current process' filename (in case it's not really named setup.exe */    /* Then copy it to the install folder */    GetModuleFileName(NULL, szBuf, sizeof(szBuf));    ParsePath(szBuf, szMFN, sizeof(szMFN), FALSE, PP_FILENAME_ONLY);    lstrcpy(szBuf, szSetupDir);    AppendBackSlash(szBuf, sizeof(szBuf));    lstrcat(szBuf, szMFN);    FileCopy(szBuf, destInstallDir, FALSE, FALSE);    /* now copy the rest of the setup files */    i = 0;    while(TRUE)    {      if(*SetupFileList[i] == '\0')        break;      lstrcpy(szBuf, szSetupDir);      AppendBackSlash(szBuf, sizeof(szBuf));      lstrcat(szBuf, SetupFileList[i]);      FileCopy(szBuf, destInstallDir, FALSE, FALSE);      ++i;    }    /* copy the license file */    if(*diLicense.szLicenseFilename != '\0')      FileCopy(diLicense.szLicenseFilename, destInstallDir, FALSE, FALSE);    /* copy the readme file */    if(*diSetupType.szReadmeFilename != '\0')      FileCopy(diLicense.szLicenseFilename, destInstallDir, FALSE, FALSE);    /* The dir for xpi files is just "." as opposed to ".\xpi"     * because the setup.exe (not the self-extracting .exe) will look for the     * .xpi files in the cwd. */    MozCopyStr(destInstallDir, destInstallXpiDir, sizeof(destInstallXpiDir));  }  dwIndex0 = 0;  siCObject = SiCNodeGetObject(dwIndex0, TRUE, AC_ALL);  while(siCObject)  {    LocateJar(siCObject, szArchivePath, sizeof(szArchivePath), TRUE);    if(*szArchivePath != '\0')    {      lstrcpy(szBuf, szArchivePath);      AppendBackSlash(szBuf, sizeof(szBuf));      lstrcat(szBuf, siCObject->szArchiveName);      FileCopy(szBuf, destInstallXpiDir, FALSE, FALSE);    }    ++dwIndex0;    siCObject = SiCNodeGetObject(dwIndex0, TRUE, AC_ALL);  }}