OutputTitle(hdc, sgProduct.szProductName);
OutputSetupTitle(hdc);
HRESULT ParseConfigIni(LPSTR lpszCmdLine){  HDC  hdc;  char szBuf[MAX_BUF];  char szShowDialog[MAX_BUF];  if(InitSetupGeneral())    return(1);  if(InitDlgWelcome(&diWelcome))    return(1);  if(InitDlgLicense(&diLicense))    return(1);  if(InitDlgSetupType(&diSetupType))    return(1);  if(InitDlgSelectComponents(&diSelectComponents, SM_SINGLE))    return(1);  if(InitDlgWindowsIntegration(&diWindowsIntegration))    return(1);  if(InitDlgProgramFolder(&diProgramFolder))    return(1);  if(InitDlgStartInstall(&diStartInstall))    return(1);  if(InitSDObject())    return(1);  if(InitSCoreFile())    return(1);   /* get Alternate Archive Search Path, if there is one */  GetAlternateArchiveSearchPath(lpszCmdLine);  /* get install Mode information */  GetPrivateProfileString("General", "Mode", "", szBuf, MAX_BUF, szFileIniConfig);  if(lstrcmpi(szBuf, "NORMAL") == 0)    sgProduct.dwMode = NORMAL;  if(lstrcmpi(szBuf, "AUTO") == 0)    sgProduct.dwMode = AUTO;  if(lstrcmpi(szBuf, "SILENT") == 0)    sgProduct.dwMode = SILENT;  /* get product name description */  GetPrivateProfileString("General", "Product Name", "", sgProduct.szProductName, MAX_BUF, szFileIniConfig);    /* get main install path */  GetPrivateProfileString("General", "Path", "", szBuf, MAX_BUF, szFileIniConfig);  DecriptString(sgProduct.szPath, szBuf);  /* make a copy of sgProduct.szPath to be used in the Setup Type dialog */  lstrcpy(szTempSetupPath, sgProduct.szPath);    /* get main program folder path */  GetPrivateProfileString("General", "Program Folder Path", "", szBuf, MAX_BUF, szFileIniConfig);  DecriptString(sgProduct.szProgramFolderPath, szBuf);    /* get main program folder name */  GetPrivateProfileString("General", "Program Folder Name", "", szBuf, MAX_BUF, szFileIniConfig);  DecriptString(sgProduct.szProgramFolderName, szBuf);  /* Welcome dialog */  GetPrivateProfileString("Dialog Welcome",             "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Welcome",             "Title",        "", diWelcome.szTitle,               MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Welcome",             "Message0",     "", diWelcome.szMessage0,            MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Welcome",             "Message1",     "", diWelcome.szMessage1,            MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Welcome",             "Message2",     "", diWelcome.szMessage2,            MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diWelcome.bShowDialog = TRUE;  /* License dialog */  GetPrivateProfileString("Dialog License",             "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog License",             "Title",        "", diLicense.szTitle,               MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog License",             "License File", "", diLicense.szLicenseFilename,     MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog License",             "Message0",     "", diLicense.szMessage0,            MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diLicense.bShowDialog = TRUE;  /* Setup Type dialog */  GetPrivateProfileString("Dialog Setup Type",          "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Setup Type",          "Title",        "", diSetupType.szTitle,             MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Setup Type",          "Message0",     "", diSetupType.szMessage0,          MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diSetupType.bShowDialog = TRUE;  /* Get Setup Types info */  GetPrivateProfileString("Setup Type0", "Description Short", "", diSetupType.stSetupType0.szDescriptionShort, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Setup Type0", "Description Long",  "", diSetupType.stSetupType0.szDescriptionLong,  MAX_BUF, szFileIniConfig);  STGetComponents("Setup Type0", &diSetupType.stSetupType0, szFileIniConfig);  GetPrivateProfileString("Setup Type1", "Description Short", "", diSetupType.stSetupType1.szDescriptionShort, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Setup Type1", "Description Long",  "", diSetupType.stSetupType1.szDescriptionLong,  MAX_BUF, szFileIniConfig);  STGetComponents("Setup Type1", &diSetupType.stSetupType1, szFileIniConfig);  GetPrivateProfileString("Setup Type2", "Description Short", "", diSetupType.stSetupType2.szDescriptionShort, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Setup Type2", "Description Long",  "", diSetupType.stSetupType2.szDescriptionLong,  MAX_BUF, szFileIniConfig);  STGetComponents("Setup Type2", &diSetupType.stSetupType2, szFileIniConfig);  GetPrivateProfileString("Setup Type3", "Description Short", "", diSetupType.stSetupType3.szDescriptionShort, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Setup Type3", "Description Long",  "", diSetupType.stSetupType3.szDescriptionLong,  MAX_BUF, szFileIniConfig);  STGetComponents("Setup Type3", &diSetupType.stSetupType3, szFileIniConfig);  /* remember the radio button that is considered the Custom type (the last radio button) */  SetCustomType();  /* Select Components dialog */  GetPrivateProfileString("Dialog Select Components",   "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Select Components",   "Title",        "", diSelectComponents.szTitle,      MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Select Components",   "Message0",     "", diSelectComponents.szMessage0,   MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diSelectComponents.bShowDialog = TRUE;  /* Windows Integration dialog */  GetPrivateProfileString("Dialog Windows Integration", "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Windows Integration", "Title",        "", diWindowsIntegration.szTitle,    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Windows Integration", "Message0",     "", diWindowsIntegration.szMessage0, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Windows Integration", "Message1",     "", diWindowsIntegration.szMessage1, MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diWindowsIntegration.bShowDialog = TRUE;  /* Program Folder dialog */  GetPrivateProfileString("Dialog Program Folder",      "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Program Folder",      "Title",        "", diProgramFolder.szTitle,         MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Program Folder",      "Message0",     "", diProgramFolder.szMessage0,      MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diProgramFolder.bShowDialog = TRUE;  /* Start Install dialog */  GetPrivateProfileString("Dialog Start Install",       "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Start Install",       "Title",        "", diStartInstall.szTitle,          MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Dialog Start Install",       "Message0",     "", diStartInstall.szMessage0,       MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diStartInstall.bShowDialog = TRUE;  /* Reboot dialog */  GetPrivateProfileString("Dialog Reboot",              "Show Dialog",  "", szShowDialog,                    MAX_BUF, szFileIniConfig);  if(lstrcmpi(szShowDialog, "TRUE") == 0)    diReboot.dwShowDialog = TRUE;  else if(lstrcmpi(szShowDialog, "AUTO") == 0)    diReboot.dwShowDialog = AUTO;  GetPrivateProfileString("Windows Integration-Item0", "CheckBoxState", "", szBuf,                           MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item0", "Description",   "", diWindowsIntegration.wiCB0.szDescription, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item0", "Archive",       "", diWindowsIntegration.wiCB0.szArchive, MAX_BUF, szFileIniConfig);  /* Check to see if the checkbox need to be shown at all or not */  if(*diWindowsIntegration.wiCB0.szDescription != '\0')    diWindowsIntegration.wiCB0.bEnabled = TRUE;  /* check to see if the checkbox needs to be checked by default or not */  if(lstrcmpi(szBuf, "TRUE") == 0)    diWindowsIntegration.wiCB0.bCheckBoxState = TRUE;  GetPrivateProfileString("Windows Integration-Item1", "CheckBoxState", "", szBuf,                           MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item1", "Description",   "", diWindowsIntegration.wiCB1.szDescription, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item1", "Archive",       "", diWindowsIntegration.wiCB1.szArchive, MAX_BUF, szFileIniConfig);  /* Check to see if the checkbox need to be shown at all or not */  if(*diWindowsIntegration.wiCB1.szDescription != '\0')    diWindowsIntegration.wiCB1.bEnabled = TRUE;  /* check to see if the checkbox needs to be checked by default or not */  if(lstrcmpi(szBuf, "TRUE") == 0)    diWindowsIntegration.wiCB1.bCheckBoxState = TRUE;  GetPrivateProfileString("Windows Integration-Item2", "CheckBoxState", "", szBuf,                           MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item2", "Description",   "", diWindowsIntegration.wiCB2.szDescription, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item2", "Archive",       "", diWindowsIntegration.wiCB2.szArchive, MAX_BUF, szFileIniConfig);  /* Check to see if the checkbox need to be shown at all or not */  if(*diWindowsIntegration.wiCB2.szDescription != '\0')    diWindowsIntegration.wiCB2.bEnabled = TRUE;  /* check to see if the checkbox needs to be checked by default or not */  if(lstrcmpi(szBuf, "TRUE") == 0)    diWindowsIntegration.wiCB2.bCheckBoxState = TRUE;  GetPrivateProfileString("Windows Integration-Item3", "CheckBoxState", "", szBuf,                           MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item3", "Description",   "", diWindowsIntegration.wiCB3.szDescription, MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Windows Integration-Item3", "Archive",       "", diWindowsIntegration.wiCB3.szArchive, MAX_BUF, szFileIniConfig);  /* Check to see if the checkbox need to be shown at all or not */  if(*diWindowsIntegration.wiCB3.szDescription != '\0')    diWindowsIntegration.wiCB3.bEnabled = TRUE;  /* check to see if the checkbox needs to be checked by default or not */  if(lstrcmpi(szBuf, "TRUE") == 0)    diWindowsIntegration.wiCB3.bCheckBoxState = TRUE;  switch(sgProduct.dwMode)  {    case AUTO:    case SILENT:      diWelcome.bShowDialog             = FALSE;      diLicense.bShowDialog             = FALSE;      diSetupType.bShowDialog           = FALSE;      diSelectComponents.bShowDialog    = FALSE;      diWindowsIntegration.bShowDialog  = FALSE;      diProgramFolder.bShowDialog       = FALSE;      diStartInstall.bShowDialog        = FALSE;      break;  }  InitSiComponents(szFileIniConfig);  /* get Default Setup Type */  GetPrivateProfileString("General", "Default Setup Type", "", szBuf, MAX_BUF, szFileIniConfig);  if((lstrcmpi(szBuf, "Setup Type 0") == 0) && diSetupType.stSetupType0.bVisible)  {    dwSetupType     = ST_RADIO0;    dwTempSetupType = dwSetupType;    SiCNodeSetItemsSelected(diSetupType.stSetupType0.dwItems, diSetupType.stSetupType0.dwItemsSelected);  }  else if((lstrcmpi(szBuf, "Setup Type 1") == 0) && diSetupType.stSetupType1.bVisible)  {    dwSetupType     = ST_RADIO1;    dwTempSetupType = dwSetupType;    SiCNodeSetItemsSelected(diSetupType.stSetupType1.dwItems, diSetupType.stSetupType1.dwItemsSelected);  }  else if((lstrcmpi(szBuf, "Setup Type 2") == 0) && diSetupType.stSetupType2.bVisible)  {    dwSetupType     = ST_RADIO2;    dwTempSetupType = dwSetupType;    SiCNodeSetItemsSelected(diSetupType.stSetupType2.dwItems, diSetupType.stSetupType2.dwItemsSelected);  }  else if((lstrcmpi(szBuf, "Setup Type 3") == 0) && diSetupType.stSetupType3.bVisible)  {    dwSetupType     = ST_RADIO3;    dwTempSetupType = dwSetupType;    SiCNodeSetItemsSelected(diSetupType.stSetupType3.dwItems, diSetupType.stSetupType3.dwItemsSelected);  }  else  {    if(diSetupType.stSetupType0.bVisible)    {      dwSetupType     = ST_RADIO0;      dwTempSetupType = dwSetupType;      SiCNodeSetItemsSelected(diSetupType.stSetupType0.dwItems, diSetupType.stSetupType0.dwItemsSelected);    }    else if(diSetupType.stSetupType1.bVisible)    {      dwSetupType     = ST_RADIO1;      dwTempSetupType = dwSetupType;      SiCNodeSetItemsSelected(diSetupType.stSetupType1.dwItems, diSetupType.stSetupType1.dwItemsSelected);    }    else if(diSetupType.stSetupType2.bVisible)    {      dwSetupType     = ST_RADIO2;      dwTempSetupType = dwSetupType;      SiCNodeSetItemsSelected(diSetupType.stSetupType2.dwItems, diSetupType.stSetupType2.dwItemsSelected);    }    else if(diSetupType.stSetupType3.bVisible)    {      dwSetupType     = ST_RADIO3;      dwTempSetupType = dwSetupType;      SiCNodeSetItemsSelected(diSetupType.stSetupType3.dwItems, diSetupType.stSetupType3.dwItemsSelected);    }  }  /* get install size required in temp for component core.  Sould be in Kilobytes */  GetPrivateProfileString("Core", "Install Size", "", szBuf, MAX_BUF, szFileIniConfig);  if(*szBuf != '\0')    siCFCoreFile.ullInstallSize = _atoi64(szBuf);  else    siCFCoreFile.ullInstallSize = 0;  GetPrivateProfileString("SmartDownload-Netscape Install", "core_file",        "", siSDObject.szCoreFile,        MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "core_file_path",   "", siSDObject.szCoreFilePath,    MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "core_dir",         "", siSDObject.szCoreDir,         MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "no_ads",           "", siSDObject.szNoAds,           MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "silent",           "", siSDObject.szSilent,          MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "execution",        "", siSDObject.szExecution,       MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "confirm_install",  "", siSDObject.szConfirmInstall,  MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Netscape Install", "extract_msg",      "", siSDObject.szExtractMsg,      MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Execution",        "exe",              "", siSDObject.szExe,             MAX_BUF, szFileIniConfig);  GetPrivateProfileString("SmartDownload-Execution",        "exe_param",        "", siSDObject.szExeParam,        MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Core",                           "Source",           "", szBuf,                        MAX_BUF, szFileIniConfig);  DecriptString(siCFCoreFile.szSource, szBuf);  GetPrivateProfileString("Core",                           "Destination",      "", szBuf,                        MAX_BUF, szFileIniConfig);  DecriptString(siCFCoreFile.szDestination, szBuf);  GetPrivateProfileString("Core",                           "Message",          "", siCFCoreFile.szMessage,       MAX_BUF, szFileIniConfig);  GetPrivateProfileString("Core",                           "Cleanup",          "", szBuf,                        MAX_BUF, szFileIniConfig);  if(lstrcmpi(szBuf, "FALSE") == 0)  {    siCFCoreFile.bCleanup = FALSE;  }  else  {    siCFCoreFile.bCleanup = TRUE;  }  hdc = GetDC(hWndMain);  OutputTitle(hdc, sgProduct.szProductName);  ReleaseDC(hWndMain, hdc);  return(0);}