ShowProgramFolder Example

InstallShield 2015 ยป InstallScript Language Reference

Note: To call this function in a Basic MSI setup, you must first create a custom action for the entry-point function, execute the custom action in a sequence or as the result of a dialog's control event, and then build the release.

/*--------------------------------------------------------------*\

*

* InstallShield Example Script

*

* Demonstrates the ShowProgramFolder function.

*

* ShowProgramFolder displays a folder, then changes the state

* of the folder.

*

* Note: This script will not run properly if the program folder

*       "Startup" does not exist.  Either create a program

*       folder called "Startup" or set the constant FOLDER so

*       that it references an existing program folder.  In

*       addition, the specified folder should be closed or

*       minimized when you run this script.

*

\*--------------------------------------------------------------*/

 

#define  FOLDER  "Startup"

 

// Include Ifx.h for built-in InstallScript function prototypes.

#include "Ifx.h"

 

export prototype ExFn_ShowProgramFolder(HWND);

 

function ExFn_ShowProgramFolder(hMSI)

begin

 

    // Display the specified folder.

    ShowProgramFolder (FOLDER, SW_SHOW);

    Delay (3);

 

    // Maximize the folder.

    ShowProgramFolder (FOLDER, SW_MAXIMIZE);

    Delay (3);

 

    // Restore the folder to its previous state.

    ShowProgramFolder (FOLDER, SW_RESTORE);

    Delay (3);

    

    // Minimize the folder.

    ShowProgramFolder (FOLDER, SW_MINIMIZE);

    Delay (3);

    

    // Restore the folder to its previous state.

    ShowProgramFolder (FOLDER, SW_RESTORE);

    Delay (3);

 

end;