AdminAskPath Example

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to InstallScript MSI projects.

//---------------------------------------------------------------------------

//

//  InstallShield Example Script

//

//  Demonstrates the AdminAskPath function.

//

//  In the OnAdminInstallUIBefore event of an InstallScript MSI project,

//  prompt the user for the target directory into which files should be

//  uncompressed and copied.

//

//---------------------------------------------------------------------------

 

function OnAdminInstallUIBefore( )

    int nResult;

 

begin

Dlg_SdWelcome:

    SdWelcome("", "");

 

Dlg_AdminAskPath:

    // prompt the user for the target path, storing it in INSTALLDIR

    nResult = AdminAskPath("", INSTALLDIR, INSTALLDIR);

    if (nResult = BACK) goto Dlg_SdWelcome;

 

    // prepare the status dialog

    SetStatusExStaticText(SdLoadString(IDS_IFX_STATUSEX_STATICTEXT_FIRSTUI));

    Enable(STATUSEX);

end;