CreateShellObjects

InstallShield 2025 ยป InstallScript Language Reference

The CreateShellObjects function creates shortcuts that are included in the current media, but are not associated with a particular component. The function also creates the folders that contain the created shortcuts if they do not already exist on the target system. (The name of the current media is stored in the system variable MEDIA.)

It is not necessary to call CreateShellObjects for shortcuts that are associated with one or more components because this function has no effect on these shortcuts. Shortcuts that are associated with components are created when the component itself is installed (for example, via a FeatureTransferData call). When the shortcuts are created, the folders containing the shortcuts will also be created, if necessary.

Caution:This function will have no effect if called from an InstallShield object's script. The creation of shell objects is not supported in an InstallShield Object project.

Note:CreateShellObjects will not create an empty folder on the target system: If a folder in the Shortcuts view is empty, this function will not create it. This restriction also applies to the shortcuts and corresponding folders that are automatically created when you call FeatureTransferData. To create an empty folder, call the CreateProgramFolder function in your script.

Syntax

CreateShellObjects (szReserved);

Parameters

CreateShellObjects Parameters

Parameter

Description

szReserved

Pass a null string (โ€œโ€) in this parameter. No other value is allowed.

Return Values

CreateShellObjects Return Values

Return Value

Description

0

Indicates that the function was successful.

< 0

Indicates that an unspecified error has occurred.

Additional Information

The value of the system variable MEDIA is set to 'DATA' during setup initialization. If you change the value of this variable to refer to a script-created component set, you must change the value back to 'DATA' before calling CreateShellObjects.

This function should be called only after FeatureTransferData has been called.

See Also