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
‎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
‎Nov 12, 2015
09:28 AM
Currently ISParcelProgress, but i have tried both with the same results.