This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Problem returning progress bar to Suite Project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2015
10:13 AM
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]
[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]
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2015
08:17 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2015
09:28 AM
Currently ISParcelProgress, but i have tried both with the same results.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)