here is my code:
szTbcoun3ini = "C:\\ProjFiles\\VoxtronCTI" ^ "country.ini";
ChangeDirectory(szTbcoun3ini);
if (GetProfString(szTbcoun3ini, "country","", svKeys) != 0) then
MessageBox ("GetProfString failed.", SEVERE);
else
KeyNameList = ListCreate(STRINGLIST);
StrGetTokens(KeyNameList, svKeys, "");
hDatabase = MsiGetActiveDatabase(hMSI);
nRet = MsiDatabaseOpenView(hDatabase, "SELECT * FROM ComboBox WHERE Property='COUNTRY'", hView);
nResult = ListGetFirstString (KeyNameList, svString);
nCtr = 1;
while (nResult != END_OF_LIST)
GetProfString(szTbcoun3ini, "country",svString, svCountry);
hRec = MsiCreateRecord(4);
MsiRecordSetString(hRec, 1,"COUNTRY");
MsiRecordSetInteger(hRec, 2, nCtr);
MsiRecordSetString(hRec, 3, svCountry);
MsiRecordSetString(hRec, 4, svCountry);
nRet = MsiViewModify(hView, MSIMODIFY_INSERT_TEMPORARY, hRec);
// Get the next string in the list.
nCtr=nCtr+1;
nResult = ListGetNextString (KeyNameList, svString);
endwhile;
endif;
MsiViewClose(hView);
ListDestroy(KeyNameList);
Then I made a custom action named SetCountryList and add it on the next button behavior of the dialog before the dialog of countrycombobox will be shown.
Upon building the project I have encounter an warning that says...
** Warning -4095: Calling DoAction from a control event on an InstallScript custom action may not work in all cases, especially if you are using SOURCEDIR, TARGETDIR, PreShowComponentDlg, or MsiDoAction in the script. Control Next, dialog HardwareConfig, argument GetCountryList.
Then when I run the project i encoutered this error...
InernalError 2878 MiscPhoneSettings, Country,Cuba
What is the possible reason of occuring this error. Geeting Country values seems to work fine. I think the error occured when the values was moved in the combobox. Any idea??? Is there any mistake on my code or what?? What is the right thing to do??
Please help I really need this one to work on my project. I would be very grateful for any help.
Thanks in advance,
Dyerald
(Edited by Dyerald at 3:45 am on Aug. 16, 2001)