if(NS_LoadString(hSetupRscInst, IDS_STR_PROGRAM_FOLDER, szBuf, MAX_BUF) == WIZ_OK)
if(GetPrivateProfileString("Messages", "STR_PROGRAM_FOLDER", "", szBuf, sizeof(szBuf), szFileIniInstall))
LPSTR GetStartInstallMessage(){  char  szBuf[MAX_BUF];  char  szSTRRequired[MAX_BUF_TINY];  siC   *siCObject   = NULL;  LPSTR szMessageBuf = NULL;  DWORD dwBufSize;  DWORD dwIndex0;  GetPrivateProfileString("Strings", "STR Force Upgrade Required", "", szSTRRequired, sizeof(szSTRRequired), szFileIniConfig);  /* calculate the amount of memory to allocate for the buffer */  dwBufSize = 0;  /* setup type */  if(NS_LoadString(hSetupRscInst, IDS_STR_SETUP_TYPE, szBuf, MAX_BUF) == WIZ_OK)    dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters  dwBufSize += 4; // take into account 4 indentation spaces  switch(dwSetupType)  {    case ST_RADIO3:      dwBufSize += lstrlen(diSetupType.stSetupType3.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters      break;    case ST_RADIO2:      dwBufSize += lstrlen(diSetupType.stSetupType2.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters      break;    case ST_RADIO1:      dwBufSize += lstrlen(diSetupType.stSetupType1.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters      break;    default:      dwBufSize += lstrlen(diSetupType.stSetupType0.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters      break;  }  dwBufSize += 2; // the extra 2 bytes is for the \r\n characters  /* selected components */  if(NS_LoadString(hSetupRscInst, IDS_STR_SELECTED_COMPONENTS, szBuf, MAX_BUF) == WIZ_OK)    dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters  dwIndex0 = 0;  siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);  while(siCObject)  {    if(siCObject->dwAttributes & SIC_SELECTED)    {      dwBufSize += 4; // take into account 4 indentation spaces      dwBufSize += lstrlen(siCObject->szDescriptionShort);    }    if(siCObject->bForceUpgrade)    {      /* add the "(Required)" string (or something equivalent) after the component description */      if(*szSTRRequired != '\0')      {        dwBufSize += 1; // space after the short description        dwBufSize += lstrlen(szSTRRequired);      }    }    if(siCObject->dwAttributes & SIC_SELECTED)      dwBufSize += 2; // the extra 2 bytes is for the \r\n characters    ++dwIndex0;    siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);  }  dwBufSize += 2; // the extra 2 bytes is for the \r\n characters  /* destination path */  if(NS_LoadString(hSetupRscInst, IDS_STR_DESTINATION_DIRECTORY, szBuf, MAX_BUF) == WIZ_OK)    dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters  dwBufSize += 4; // take into account 4 indentation spaces  dwBufSize += lstrlen(sgProduct.szPath) + 2; // the extra 2 bytes is for the \r\n characters  dwBufSize += 2; // the extra 2 bytes is for the \r\n characters  /* program folder */  if(NS_LoadString(hSetupRscInst, IDS_STR_PROGRAM_FOLDER, szBuf, MAX_BUF) == WIZ_OK)    dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters  dwBufSize += 4; // take into account 4 indentation spaces  dwBufSize += lstrlen(sgProduct.szProgramFolderName) + 2; // the extra 2 bytes is for the \r\n\r\n characters  if(GetTotalArchivesToDownload() > 0)  {    dwBufSize += 2; // the extra 2 bytes is for the \r\n characters    /* site selector info */    if(NS_LoadString(hSetupRscInst, IDS_STR_DOWNLOAD_SITE, szBuf, MAX_BUF) == WIZ_OK)      dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters    dwBufSize += 4; // take into account 4 indentation spaces    dwBufSize += lstrlen(szSiteSelectorDescription) + 2; // the extra 2 bytes is for the \r\n characters    if(diDownloadOptions.bSaveInstaller)    {      dwBufSize += 2; // the extra 2 bytes is for the \r\n characters      /* site selector info */      if(NS_LoadString(hSetupRscInst, IDS_STR_SAVE_INSTALLER_FILES, szBuf, MAX_BUF) == WIZ_OK)        dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters      GetSaveInstallerPath(szBuf, sizeof(szBuf));      dwBufSize += 4; // take into account 4 indentation spaces      dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters    }  }  dwBufSize += 1; // take into account the null character  /* From here down, the buffer is created given the above calculated buffer size.  If the    * string concatenation (addition) is changed below, then the buffer size calculation above   * needs to be changed accordingly! */  /* allocate the memory */  if((szMessageBuf = NS_GlobalAlloc(dwBufSize)) != NULL)  {    ZeroMemory(szMessageBuf, dwBufSize);    /* Setup Type */    if(NS_LoadString(hSetupRscInst, IDS_STR_SETUP_TYPE, szBuf, MAX_BUF) == WIZ_OK)    {      lstrcat(szMessageBuf, szBuf);      lstrcat(szMessageBuf, "\r\n");    }    lstrcat(szMessageBuf, "    "); // add 4 indentation spaces          switch(dwSetupType)    {      case ST_RADIO3:        AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType3.szDescriptionShort);        break;      case ST_RADIO2:        AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType2.szDescriptionShort);        break;      case ST_RADIO1:        AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType1.szDescriptionShort);        break;      default:        AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType0.szDescriptionShort);        break;    }    lstrcat(szMessageBuf, "\r\n\r\n");    /* Selected Components */    if(NS_LoadString(hSetupRscInst, IDS_STR_SELECTED_COMPONENTS, szBuf, MAX_BUF) == WIZ_OK)    {      lstrcat(szMessageBuf, szBuf);      lstrcat(szMessageBuf, "\r\n");    }    dwIndex0  = 0;    siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);    while(siCObject)    {      if(siCObject->dwAttributes & SIC_SELECTED)      {        lstrcat(szMessageBuf, "    "); // add 4 indentation spaces        lstrcat(szMessageBuf, siCObject->szDescriptionShort);      }      if(siCObject->bForceUpgrade)      {        /* add the "(Required)" string (or something equivalent) after the component description */        if(*szSTRRequired != '\0')        {          lstrcat(szMessageBuf, " "); // add 1 space          lstrcat(szMessageBuf, szSTRRequired);        }      }      if(siCObject->dwAttributes & SIC_SELECTED)        lstrcat(szMessageBuf, "\r\n");      ++dwIndex0;      siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);    }    lstrcat(szMessageBuf, "\r\n");    /* destination directory */    if(NS_LoadString(hSetupRscInst, IDS_STR_DESTINATION_DIRECTORY, szBuf, MAX_BUF) == WIZ_OK)    {      lstrcat(szMessageBuf, szBuf);      lstrcat(szMessageBuf, "\r\n");    }    lstrcat(szMessageBuf, "    "); // add 4 indentation spaces    lstrcat(szMessageBuf, sgProduct.szPath);    lstrcat(szMessageBuf, "\r\n\r\n");    /* program folder */    if(NS_LoadString(hSetupRscInst, IDS_STR_PROGRAM_FOLDER, szBuf, MAX_BUF) == WIZ_OK)    {      lstrcat(szMessageBuf, szBuf);      lstrcat(szMessageBuf, "\r\n");    }    lstrcat(szMessageBuf, "    "); // add 4 indentation spaces    lstrcat(szMessageBuf, sgProduct.szProgramFolderName);    lstrcat(szMessageBuf, "\r\n");    if(GetTotalArchivesToDownload() > 0)    {      lstrcat(szMessageBuf, "\r\n");      /* site selector info */      if(NS_LoadString(hSetupRscInst, IDS_STR_DOWNLOAD_SITE, szBuf, MAX_BUF) == WIZ_OK)      {        lstrcat(szMessageBuf, szBuf);        lstrcat(szMessageBuf, "\r\n");      }      lstrcat(szMessageBuf, "    "); // add 4 indentation spaces      lstrcat(szMessageBuf, szSiteSelectorDescription); // site selector description      lstrcat(szMessageBuf, "\r\n");      if(diDownloadOptions.bSaveInstaller)      {        lstrcat(szMessageBuf, "\r\n");        /* site selector info */        if(NS_LoadString(hSetupRscInst, IDS_STR_SAVE_INSTALLER_FILES, szBuf, MAX_BUF) == WIZ_OK)        {          lstrcat(szMessageBuf, szBuf);          lstrcat(szMessageBuf, "\r\n");        }        GetSaveInstallerPath(szBuf, sizeof(szBuf));        lstrcat(szMessageBuf, "    "); // add 4 indentation spaces        lstrcat(szMessageBuf, szBuf);        lstrcat(szMessageBuf, "\r\n");      }    }  }  return(szMessageBuf);}