Main idea: Sometimes you need to create a shortcut in the specified folder, depending on your business needs. Add a shortcut to any specified folder by InstallShield's Addfoldericon function.
Addfoldericon (Szprogramfolder, Szitemname, Szcommandline, Szworkingdir, Sziconpath, Nicon, SzShortCutKey, NFlag); /**/ /*--------------------------------------------------------------*
*
* InstallShield Example Script
*
* Demonstrates the Addfoldericon function.
*
* This example places a shortcut to an executable file on the
* Start Menu and the Start Programs menu.
*
* Note:before running this script, set the preprocessor
* Constants so they reference the fully-qualified
* Names of the Windows Notepad executable and a valid
* Text file on the target system.
*
*--------------------------------------------------------------*/
#define PROGRAM "C:/windows/notepad.exe"
#define PARAM "C:/windows/readme.txt"
STRING Szprogramfolder, Szitemname, Szcommandline, Szworkingdir, Sziconpath;
STRING Szshortcutkey, Szprogram, Szparam;
Number Nicon;
#include "ifx.h"
Program
Set up parameters for call to Addfoldericon.
Szprogramfolder = Folder_startmenu;
Szitemname = "Notepad Example 1";
Szprogram = Program;
Szparam = PARAM;
Longpathtoquote (Szprogram, TRUE);
Longpathtoshortpath (Szparam);
Szcommandline = Szprogram + "" + Szparam;
Szworkingdir = "";
Sziconpath = "";
Nicon = 0;
Szshortcutkey = "";
ADD a shortcut to the Start menu.
if (Addfoldericon (Szprogramfolder, Szitemname, Szcommandline, Szworkingdir,
Sziconpath, Nicon, Szshortcutkey, REPLACE) < 0) Then
MessageBox ("Addfoldericon failed.", SEVERE);
Else
Sprintfbox (Information, "Addfoldericon", "%s created successfully.",
Szitemname);
endif