MSI Factory 2.3

MSI.ViewModify

MSI.ViewModify

This is the first topic This is the last topic  

MSI.ViewModify

This is the first topic This is the last topic  

OverviewExamples

boolean MSI.ViewModify (

number hView,

number ModifyMode,

number hRecord )

Example 1

hDatabase = MSI.GetActiveDatabase(_hInstall);

 

if (hDatabase ~= 0) then

   -- Get the Controls

   strQuery = "SELECT * FROM `ControlEvent`";

   hView = MSI.DatabaseOpenView(hDatabase, strQuery);

   if (hView ~= 0) then

 

       bExecuteResult = MSI.ViewExecute(hView, 0);

       if (bExecuteResult) then

           bContinue = true;

 

           while (bContinue) do

               hRecord = MSI.ViewFetch(hView);

               if (hRecord ~= 0) then

                   -- Find the Next button on the welcome dialog

                   strDialog = MSI.RecordGetString(hRecord, 1);

                   strControl = MSI.RecordGetString(hRecord, 2);

                   if ((strDialog == "WelcomeDlg") and (strControl == "Next")) then

                       --We found it

                       bContinue = false

                       -- Skip the LicenseAgreementDlg

                       MSI.RecordSetString(hRecord, 4, "InstallDirDlg")

                       MSI.ViewModify(hView, MSIMODIFY_MERGE, hRecord)

                   end

               else

                   bContinue = false;

                   MSI.CloseHandle(hRecord);

               end

           end

       end

       MSI.ViewClose(hView);

       MSI.CloseHandle(hView);

 

   else

       hError = MSI.GetLastErrorRecord();

       strError = MSI.FormatRecord(_hInstall, hError);

       Dialog.Message("Error", "Error opening database view:\r\n"..strError);

       MSI.CloseHandle(hError);

   end

 

   MSI.CloseHandle(hDatabase);

end

Modifies the Welcome screen's 'Next' button control so it skips the LicenseAgreementDlg and goes straight to InstallDirDlg.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us