DeleteShortcutFolder

InstallShield 2016 » InstallScript Language Reference

The DeleteShortcutFolder function removes a shortcut folder (that is, a subfolder of the Start menu's Programs folder) and its contents, including all shortcuts and all of the shortcut folder’s subfolders and their contents. DeleteShortcutFolder cannot remove the Programs folder.

Tip • In a Basic MSI or InstallScript MSI project, this functionality is possibly better achieved by using the native Windows Installer RemoveFolders action. Or, if you are simply uninstalling, the Windows Installer engine natively handles the removal of all files and folders that were created during the installation. For more information on the RemoveFolders action, see the Windows Installer Help.

Syntax

DeleteShortcutFolder ( szFolderName );

Parameters

DeleteShortcutFolder Parameters

Parameter

Description

szFolderName

Specify the name of the folder to remove.

Return Values

DeleteShortcutFolder Return Values

Return Value

Description

0

Indicates that the function successfully removed the specified folder.

< 0

Indicates that the function was unable to remove the folder.

You can obtain the error message text associated with a large negative return value—for example, -2147024891 (0x80070005)—by calling FormatMessage.

See Also