views:

1576

answers:

3

Is it possible to create shortcuts in Install Shield 2009 based on user input? In essnes, a shortcut will be created (on the desktop) only if the user (who runs the installation) wants to do so

A: 

It's been a while since I've used installshield, my company is currently using WISE as an installer; however, it should be possible to do what you are asking.

In general installer terms you need to do the following:

  1. Make a screen for your installer that presents the option to create the shortcut, this screen should have the prompt text and a checkbox.
  2. There should be a mechanism for storing the response of the checkbox in an Installshield property.
  3. During the execution phase, use the reponse to trigger the creation of the shortcut.

I don't know about the capabilities of Installshield 2009 for whether this can be done without editing the script itself.

I hope this helps.

Steve Mitcham
+3  A: 

We have a screen that prompts the user to create desktop and quicklaunch shortcuts.

The shortcuts are then each in individual components with a condition set to only install if the checkbox was selected.

You also should store this response in the registry somewhere, and read it back during a reconfigure, upgrade, repair, etc. Otherwise if the checkboxes were on by default and that screen does not display to the user, the condition will evaluate to true (because the default property is true) and although the shortcut was not initially installed, it will be created during the repair if the components condition is reevaluated.

sascha
+2  A: 

I do something similar to Sacha, but I'm lazier. ;-)

I create a component for each desktop shortcut (I hate software that assumes it's allowed to dump shortcuts on my desktop); no file in the component. Then I assign each of these components to its own feature. Then I can use standard feature selection dialogs (which is built in automatically and used when the user selects a Custom installation) to let the user select the desktop shortcut features.

I don't see a lot of software installers offering to install optional shortcuts in the feature selection dialog, but it strikes me as a natural place to do it. More technical users may see this as mixing metaphors.

FWIW, I originally did this in an InstallScript/MSI project, and I've just done the exact same thing in a straight MSI project, and the technique works fine in both.

Terry