cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jchristman
Level 8

InstallScript start menu shortcut

I have been looking for a way to rename or edit the shortcut that is created in the startmenu for the Application for an InstallScript Project.

I have my installation doing multiple instances so I want to have a shortcut placed based on the instance.

Current Setup:
Start Menu > MyCompany > MyProduct > MyApp
always points to last instance that was installed.

Example Needed:
Start Menu > MyCompany > MyProduct > MyApp_1
Start Menu > MyCompany > MyProduct > MyApp_2
Start Menu > MyCompany > MyProduct > MyApp_3

and each shortcut points to the corresponding location and executable
Labels (1)
0 Kudos
8 Replies
RobertDickau
Flexera Alumni

Depending on how you're creating the shortcut, perhaps append IFX_MULTI_INSTANCE_SUFFIX (or the like) to its display name?
0 Kudos
jchristman
Level 8

Thank you, I am using the shortcuts options to install and setup the shortcut, I had the displayed name set to the application I changed this to be and am now doing a TextSubSetValue to set the name and this works great for changing the name and adding the instance to it.
0 Kudos
TheTraveler
Level 8

The one thing that I like about install shield, it has multiple ways of doing the same thing. If you would like to know more, check these out in the help.

AddFolderIcon
LongPathToQuote
ProgDefGroupType
CreateDir


Is use the above IS functions calls to create my windows shortcuts.
0 Kudos
Maverick74
Level 2

jchristman wrote:
Thank you, I am using the shortcuts options to install and setup the shortcut, I had the displayed name set to the application I changed this to be and am now doing a TextSubSetValue to set the name and this works great for changing the name and adding the instance to it.


Hello I am new here and new to Installshield. Dealing with a Installscript.

I am trying to do something very similar and I am letting the Assistant and or Install Designer help me create this shortcut. This method you describe, does this also change where your application is placed in the directories. I want to do something similar as I want to be able to offer the rename of the shortcut (I planned on using SdSelectFolder for the prompt) but I do not want to change the TARGETDIR. Trying to learn this and understand how you are accomplishing this. Thanks for any help!!!
0 Kudos
TheTraveler
Level 8

Here is a small example of what you could do.

///////////////////////////////////////////////////////////////////////////////
// //
// //
// //
///////////////////////////////////////////////////////////////////////////////
function OnFirstUIAfter()
STRING strTemp;
STRING strValue;
STRING strFileName;
STRING strPath;
begin
.
.
.
///////////////////////////////////////////////////////////////////////////
// This will place the program group for all users to see...
///////////////////////////////////////////////////////////////////////////
ProgDefGroupType(COMMON);

strPath = FOLDER_PROGRAMS ^ "My Program Group";
CreateDir(strPath);

///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
strTemp = TARGETDIR ^ "MyOtherDirectory";
strValue = strTemp;
LongPathToQuote( strValue, TRUE );

strFileName = strTemp ^ "MyProgram.exe";
LongPathToQuote( strFileName, TRUE );
AddFolderIcon(strPath, "MyProgram", strFileName, strValue, "", 0, "", REPLACE);

.
.
.
end;
0 Kudos
jchristman
Level 8

No, it only changes the name that is displayed in the menu.

you do this by going into the Installation Designer
System Configuration
Shortcuts
then create the shortcut.


now with the shortcut created click on it to hightlight and on the right side Click in the field for "Display Name" and enter in "" then in you installscript code do something like

TextSubSetValue("",svShortCutName,False); this does the text replacement and sets up the new name. This will need to be done before the install starts.
0 Kudos
Maverick74
Level 2

Thanks for the guidance and suggestions!! I will experiment with these shortly.
0 Kudos
TheTraveler
Level 8

AddFolderIcon doesn't just replace text in an already existing short-cut. It will add or replace a windows short-cut. I have been using this function for years and I don't have any short-cuts defined anywhere in the IDE. It is all done in Install Shield Script code.
0 Kudos