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
- :
- Thank you!
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
‎Jan 26, 2010
06:10 PM
InstallScript MSI Progress Screen question
All,
I have an InstallScript MSI project that I am having an issue with (2010 Premier). By default, it doesn't show a license dialog, so I added the dialogs in the installscript that I want to show, but I can't find how to show the setup progress dialog (like what is shown if no OnFirstUIBefore function is added). Does anyone have any idea how to add the progress screen?
here is my OnFirstUIBefore script:
I have an InstallScript MSI project that I am having an issue with (2010 Premier). By default, it doesn't show a license dialog, so I added the dialogs in the installscript that I want to show, but I can't find how to show the setup progress dialog (like what is shown if no OnFirstUIBefore function is added). Does anyone have any idea how to add the progress screen?
here is my OnFirstUIBefore script:
function OnFirstUIBefore()
number nResult, nLevel, nSize, nSetupType, nControl, nvSize, nvWebSiteNumber;
string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile, szDllName, szTemp;
string szName, szCompany, szTargetPath, szDir, szFeatures, szDataDir;
string svVirtualDirectory, szSelectWebSiteDialog;
string szDefPath;
BOOL bLicenseAccepted, bDone;
object myDllObject;
string webSitesList;
LIST listId;
begin
nSetupType = COMPLETE;
szDir = TARGETDIR;
szDataDir = "";
szName = "";
szCompany = "";
bLicenseAccepted = FALSE;
// Beginning of UI Sequence
Dlg_Start:
nResult = 0;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
//{{IS_SCRIPT_TAG(Dlg_SdWelcome)
nResult = SdWelcome( szTitle, szMsg );
//}}IS_SCRIPT_TAG(Dlg_SdWelcome)
if (nResult = BACK) goto Dlg_Start;
Dlg_SdLicense2:
szTitle = "";
szOpt1 = "";
szOpt2 = "";
//{{IS_SCRIPT_TAG(License_File_Path)
szLicenseFile = SUPPORTDIR ^ "License.rtf";
//}}IS_SCRIPT_TAG(License_File_Path)
//{{IS_SCRIPT_TAG(Dlg_SdLicense2)
nResult = SdLicense2Rtf( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted );
//}}IS_SCRIPT_TAG(Dlg_SdLicense2)
if (nResult = BACK) then
goto Dlg_SdWelcome;
else
bLicenseAccepted = TRUE;
endif;
Dlg_SdRegisterUser:
szMsg = "";
szTitle = "";
//{{IS_SCRIPT_TAG(Dlg_SdRegisterUser)
nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany );
//}}IS_SCRIPT_TAG(Dlg_SdRegisterUser)
if (nResult = BACK) goto Dlg_SdLicense2;
Dlg_SetupType2:
szTitle = "";
szMsg = "";
nResult = CUSTOM;
//{{IS_SCRIPT_TAG(Dlg_SetupType2)
nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 );
//}}IS_SCRIPT_TAG(Dlg_SetupType2)
if (nResult = BACK) then
goto Dlg_SdRegisterUser;
else
nSetupType = nResult;
if (nSetupType != CUSTOM) then
szTargetPath = TARGETDIR;
nSize = 0;
FeatureCompareSizeRequired( MEDIA, szTargetPath, nSize );
if (nSize != 0) then
MessageBox( szSdStr_NotEnoughSpace, WARNING );
goto Dlg_SetupType2;
endif;
endif;
endif;
Dlg_SdFeatureTree:
if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2;
szTitle = "";
szMsg = "";
szFeatures = "";
nLevel = 2;
if (nSetupType = CUSTOM) then
//{{IS_SCRIPT_TAG(Dlg_SdFeatureTree)
nResult = SdFeatureTree( szTitle, szMsg, TARGETDIR, szFeatures, nLevel );
//}}IS_SCRIPT_TAG(Dlg_SdFeatureTree)
if (nResult = BACK) goto Dlg_SetupType2;
endif;
Dlg_SdSelectWebSite:
if (nSetupType = CUSTOM) then
szSelectWebSiteDialog = "sdSelectWebSite2";
szDllName = SUPPORTDIR ^ "ExistingWebSites.dll";
szTemp = "ExistingWebSites.WebSites";
nvSize = MAX_PATH;
set myDllObject = DotNetCoCreateObject(szDllName, szTemp, "");
webSitesList = myDllObject.ListSites();
listId = ListCreate(STRINGLIST);
StrGetTokens(listId, webSitesList, "~");
MsiGetProperty(ISMSI_HANDLE, "VIRTUALDIRECTORY", svVirtualDirectory, nvSize);
EzDefineDialog(szSelectWebSiteDialog, ISUSER, szSelectWebSiteDialog, 0);
bDone = FALSE;
while(!bDone)
nControl = WaitOnDialog(szSelectWebSiteDialog);
switch(nControl)
case DLG_INIT:
CtrlSetText(szSelectWebSiteDialog, 1304, svVirtualDirectory);
CtrlSetList(szSelectWebSiteDialog, 1306, listId);
CtrlSetCurSel(szSelectWebSiteDialog, 1306, "Default");
case 12: // back
nResult = BACK;
bDone = TRUE;
case 1: // next
CtrlGetText(szSelectWebSiteDialog, 1304, svVirtualDirectory);
CtrlGetCurSel(szSelectWebSiteDialog, 1306, szTemp);
nvWebSiteNumber = myDllObject.FindWebSiteNumber(szTemp);
NumToStr(szTemp, nvWebSiteNumber);
MsiSetProperty(ISMSI_HANDLE, "TARGETVDIR", szTemp);
MsiSetProperty(ISMSI_HANDLE, "VIRTUALDIRECTORY", svVirtualDirectory);
bDone = TRUE;
case 9:
nResult = CANCEL;
bDone = TRUE;
endswitch;
endwhile;
EndDialog(szSelectWebSiteDialog);
ReleaseDialog(szSelectWebSiteDialog);
ListDestroy(listId);
if (nResult = BACK) goto Dlg_SdFeatureTree;
if (nResult = CANCEL) then abort endif;
endif;
nResult = 0;
Dlg_SdAskDestPath2:
if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType2;
szTitle = "";
szMsg = "";
if (nSetupType = CUSTOM) then
//{{IS_SCRIPT_TAG(Dlg_SdAskDestPath2)
nResult = SdAskDestPath2( szTitle, szMsg, szDir );
//}}IS_SCRIPT_TAG(Dlg_SdAskDestPath2)
TARGETDIR = szDir;
endif;
if (nResult = BACK) goto Dlg_SdSelectWebSite;
Dlg_ObjDialogs:
nResult = ShowObjWizardPages( nResult );
if (nResult = BACK) goto Dlg_SdAskDestPath2;
Dlg_SdStartCopy2:
szTitle = "";
szMsg = "";
//{{IS_SCRIPT_TAG(Dlg_SdStartCopy2)
nResult = SdStartCopy2( szTitle, szMsg );
//}}IS_SCRIPT_TAG(Dlg_SdStartCopy2)
if (nResult = BACK) goto Dlg_ObjDialogs;
// Added in 11.0 - Set appropriate StatusEx static text.
SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_FIRSTUI ) );
return 0;
end;
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
05:58 AM
Before return 0, add the following:
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
11:49 AM
😄 Thanks J_anitha, that did the trick.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)