PlinyElder
Flexera beginner

Problem returning progress bar to Suite Project

So i am working with a Basic MSI project to enable IIS features and give a progress bar back to the user. The basic MSI when run on its own, works perfectly and as expected. The problem i am having is when i add this IIS.msi package to my Suite installer, while it executes the IIS.msi package, the progress bar DOESNT move at all. I get updated progress text as each action takes place but no movement on the Suite progress bar. What am i missing? I feel like my msi isnt returning the status back to the suite. Any help from someone out there?

[CODE]
#include "ifx.h"

export prototype NUMBER IISComponentInstallation(HWND);


function IISComponentInstallation(hMSI)
STRING svDismLocation;
STRING svDism;
STRING svDismHost;
STRING arrFeature(10);

NUMBER nCount;

INT iResult;

HWND hRecord;
begin
svDismLocation = WINDIR ^ "\\SysNative\\dism.exe";
svDism = "Dism.exe";
svDismHost = "DismHost.exe";
nCount = 0;

arrFeature(0) = "IIS-StaticContent";
arrFeature(1) = "IIS-ManagementConsole";
arrFeature(2) = "IIS-ManagementScriptingTools";
arrFeature(3) = "IIS-ISAPIFilter";
arrFeature(4) = "IIS-ISAPIExtensions";
arrFeature(5) = "IIS-RequestFiltering";
arrFeature(6) = "IIS-NetFxExtensibility";
arrFeature(7) = "IIS-ASP";
arrFeature(8) = "IIS-DefaultDocument";
arrFeature(9) = "IIS-ASPNET";


hRecord = MsiCreateRecord(3);

// Reset the progress bar to 10 total ticks.
MsiRecordSetInteger(hRecord, 1, 0);
MsiRecordSetInteger(hRecord, 2, 10); // Total number of ticks the progress bar will contain
MsiRecordSetInteger(hRecord, 3, 0);
iResult = MsiProcessMessage(hMSI, INSTALLMESSAGE_PROGRESS, hRecord);
if( iResult = IDCANCEL ) then
return ERROR_INSTALL_USEREXIT;
endif;

while( nCount <= 9 )
// Send one progress tick.
MsiRecordSetInteger(hRecord, 1, 2);
MsiRecordSetInteger(hRecord, 2, 1);
MsiRecordSetInteger(hRecord, 3, 0);
iResult = MsiProcessMessage(hMSI, INSTALLMESSAGE_PROGRESS, hRecord);
if( iResult = IDCANCEL ) then
return ERROR_INSTALL_USEREXIT;
endif;


MsiRecordSetString(hRecord, 1, "callAddProgressInfo");
MsiRecordSetString(hRecord, 2, "Configuring " + arrFeature(nCount));
MsiRecordSetString(hRecord, 3, "Incrementing tick [1] of [2]");
iResult = MsiProcessMessage(hMSI, INSTALLMESSAGE_ACTIONSTART, hRecord);
if( iResult = IDCANCEL ) then
return ERROR_INSTALL_USEREXIT;
endif;

LaunchApplication( svDismLocation, "/Online /Enable-Feature /FeatureName:" + arrFeature(nCount) + "", "", SW_NORMAL, 30000, LAAW_OPTION_WAIT );

while( IsAppRunning( svDism ) || IsAppRunning( svDismHost ) )
Delay( 1 );
endwhile;

nCount = nCount + 1;
endwhile;

MsiCloseHandle(hRecord);
return ERROR_SUCCESS;
end;
[/CODE]
Labels (1)
0 Kudos
2 Replies
MichaelU
Flexera
Flexera

Which property do you have associated with the progress bar in your suite? You will get different behavior depending on whether it reads ISInstallProgress or ISParcelProgress.
0 Kudos
PlinyElder
Flexera beginner

Currently ISParcelProgress, but i have tried both with the same results.
0 Kudos