Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Problem with ComboBox.. Pls. help

2 replies to this topic


  • Members
  • 43 posts

Posted 15 August 2001 - 11:37

Im using IPWI 2.03 and Im doing a project with a custom dialog. Within the custom dialog I made a combobox where in the user can select his country. those list of countries are taken from a ini file named country.ini.

here is my code:

szTbcoun3ini = "C:\\ProjFiles\\VoxtronCTI" ^ "country.ini";    

if (GetProfString(szTbcoun3ini, "country","", svKeys) != 0) then
   MessageBox ("GetProfString failed.", SEVERE);
  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.
        nResult = ListGetNextString (KeyNameList, svString);

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,

(Edited by Dyerald at 3:45 am on Aug. 16, 2001)


  • Members
  • 43 posts

Posted 20 August 2001 - 03:43

hey guys,
I've found the answers already... Ijust have to put the custom action that I made in the sequence and not in the next behavior... the warnings are all gone when I did this... and about the external errorI already found whats wrong... its in my inifile. =) Thanks for making an effort to read my post. 'Till next time. =)