This is the Function Which does the action
// Function: DialogDBOptions//// Purpose: This function will ask user for database optionsfunction DialogDBOptions(nDirection)BOOL bOptCreateDB;NUMBER nAskResult, nResult, i, j;STRING szRulesFile, szDBOpts, szLoadType;STRING szTmp;STRING szSaveMEDIAValue, szDbLoadCfg, szDescription, szCompName, svNum;NUMBER nIndex, nResult2, nListDBLoadTypes;LIST listDBLoadTypes, listDataSets, listDataNames;BOOL bSelected;BOOL bConflict;STRING szResult;beginnAskResult = nDirection;if(isAutoInstall()) thenm_strCreateSchema = getAutoInstallString(AUTOINSTALL_DB, CREATE_SCHEMA);m_strLoadBaseData = getAutoInstallString(AUTOINSTALL_DB, LOAD_BASE);m_strLoad3PLData = getAutoInstallString(AUTOINSTALL_DB, LOAD_3PL);m_strSelectedDatasets = getAutoInstallString(AUTOINSTALL_DB, LOAD_DATASETS);return NEXT;endif;//Get shared dataDlg_DB_Options://szSaveMEDIAValue = MEDIA;//MEDIA = "custom2";szDbLoadCfg = SRCDIR ^ "..\\database\\dbload.cfg";nIndex = 0;//set the prompt variables based on the property valuesif (m_strCreateSchema = LESENV_TRUE)thenbOptCreateDB = TRUE;elsebOptCreateDB = FALSE;endif;//Need to determine what data load options to provide//then need to enforce rules if any//Currently check for seamles, wmd, lm, lens, dsup & cdmrqalistDBLoadTypes = ListCreate(STRINGLIST);listDataSets = ListCreate(STRINGLIST);listDataNames = ListCreate(STRINGLIST);szRulesFile = RetrieveSharedProperty(m_arraySharedProperties, "RULESFILE");// Get database options for all products and selected objectsGetDBLoadTypes(m_strSelectedObjects, szRulesFile, listDBLoadTypes);GetDBLoadTypes(m_strProductsInstalled, szRulesFile, listDBLoadTypes);if(m_bUpgrade && (ListCount(listDBLoadTypes) == 0)) then// No datasets found to prompt during upgrade:m_strSelectedDatasets = "";goto ExitDialogDBOptions;endif;//Loop thru list to set the prompts// Resize the arrays// The first position is for create schema promptif(ListCount(listDBLoadTypes) > 0) thenResize(m_szLoadTypes, ListCount(listDBLoadTypes)+1);Resize(m_bLoadTypeSelected, ListCount(listDBLoadTypes)+1);Resize(m_szLoadTypePrompts, ListCount(listDBLoadTypes)+1);elseResize(m_szLoadTypes, 30);Resize(m_bLoadTypeSelected, 30);Resize(m_szLoadTypePrompts, 30);endif;for i = 0 to SizeOf(m_szLoadTypes)-1m_szLoadTypes(i) = "";m_bLoadTypeSelected(i) = FALSE;m_szLoadTypePrompts(i) = "";endfor;// 0m_szLoadTypePrompts(0) = @PROMPT_CREATE_SCHEMA;m_szLoadTypes(0) = "";if(m_bUpgrade) then// During upgrade list datasets onlyi = 0;else// During fresh install start with "create database" checkboxi = 1;endif;nResult = ListGetFirstString(listDBLoadTypes, szLoadType);while (nResult != END_OF_LIST)NumToStr(svNum, i);if (szLoadType = "WM") then// PR 51301: Never prompt for WM data// If DCS is installed then automatically load itelsem_szLoadTypes(i) = szLoadType;GetProfString(szDbLoadCfg, szLoadType, "desc", szTmp);m_szLoadTypePrompts(i) = "Load " + szTmp;// Now set the initial value from the defaultsfor j = 0 to SizeOf(m_szInitLoadTypes)-1if(m_szInitLoadTypes(j) = m_szLoadTypes(i)) thenm_bLoadTypeSelected(i) = m_bInitLoadTypeSelected(j);endif;endfor;i = i + 1;endif;nResult = ListGetNextString(listDBLoadTypes, szLoadType);endwhile;if (i = 0)goto ExitDialogDBOptions;if(i > 0) thenResize(m_szLoadTypes, i);Resize(m_bLoadTypeSelected, i);Resize(m_szLoadTypePrompts, i);endif;//Check to see if the user has been here alreadyif(!m_bUpgrade) thenm_bLoadTypeSelected(0) = bOptCreateDB;endif;SetDialogTitle(DLG_ASK_OPTIONS, @TITLE_DATABASE_OPTION);DialogScreen:if (RetrieveSharedProperty(m_arraySharedProperties, "SimpleInstall") = "TRUE") thennAskResult = NEXT;elseif(!m_bUpgrade) then// Fresh installnAskResult = AskOptionsArray(NONEXCLUSIVE,@MSG_SELECT_DB_OPTIONS, m_szLoadTypePrompts, m_bLoadTypeSelected);bOptCreateDB = m_bLoadTypeSelected(0);else// Upgrade/HotfixnAskResult = AskOptionsArray(NONEXCLUSIVE,@MSG_SELECT_UPGRADE_DB_OPTIONS, m_szLoadTypePrompts, m_bLoadTypeSelected);endif;if (nAskResult != BACK) thenm_strSelectedDatasets = "";if (bOptCreateDB)thenm_strCreateSchema = LESENV_TRUE;elsem_strCreateSchema = LESENV_FALSE;endif;//Check for some user valuesfor i = 0 to SizeOf(m_szLoadTypes)-1if(m_bLoadTypeSelected(i) = TRUE) thenszResult = LESENV_TRUE;if(m_bUpgrade || i > 0) thenif(m_strSelectedDatasets = "") thenm_strSelectedDatasets = m_szLoadTypes(i);elsem_strSelectedDatasets = m_strSelectedDatasets+ "," + m_szLoadTypes(i);endif;endif;elseszResult = LESENV_FALSE;endif;if(m_szLoadTypes(i) = "3PL") thenm_strLoad3PLData = szResult;elseif(m_szLoadTypes(i) = "BASE") thenm_strLoadBaseData = szResult;endif;endfor;endif;//Check for conflicting datasets.//If there is a conflict return to the DialogScreenbConflict=CheckDatasetConflict();if (bConflict) thengoto DialogScreen;endif;ExitDialogDBOptions:ListDestroy(listDBLoadTypes);recordAutoInstallString(AUTOINSTALL_DB, CREATE_SCHEMA, m_strCreateSchema);recordAutoInstallString(AUTOINSTALL_DB, LOAD_BASE, m_strLoadBaseData);recordAutoInstallString(AUTOINSTALL_DB, LOAD_3PL, m_strLoad3PLData);recordAutoInstallString(AUTOINSTALL_DB, LOAD_DATASETS, m_strSelectedDatasets);return nAskResult;end;

Install script issue :For windows server installs, dboption checkboxes
Posted 13 December 2014 - 11:17
Posted 15 December 2014 - 07:14
Looks Like the code is coming from the below loop
This is where all the magic happens
m_szLoadTypes(i) = szLoadType;
GetProfString(szDbLoadCfg, szLoadType, "desc", szTmp);
m_szLoadTypePrompts(i) = "Load " + szTmp;
// Now set the initial value from the defaults
for j = 0 to SizeOf(m_szInitLoadTypes)-1
if(m_szInitLoadTypes(j) = m_szLoadTypes(i)) then
m_bLoadTypeSelected(i) = m_bInitLoadTypeSelected(j);
endif;
endfor;
Need to exactly change here for other options to be stored. Please any one help.