CreateShortcutFolder Example

InstallShield 2016 » 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 CreateShortcutFolder function.

*

* This script creates a program folder named ExampleFolder

* on the target system.

*

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

 

function OnFirstUIAfter()

    STRING  szShortcutFolder, szTitle, szMsg;

begin

 

    // Set up parameters for call to CreateShortcutFolder.

    szShortcutFolder = "ExampleFolder";

    szTitle      = "CreateShortcutFolder";

    szMsg        = "%s created successfully.";

    

    // Create the program folder.

    if (CreateShortcutFolder (szShortcutFolder) < 0) then

        MessageBox ("Unable to create program folder", SEVERE);

    else

        SprintfBox (INFORMATION, szTitle, szMsg, szShortcutFolder);

    endif;

 

end;