如何使用InstallShield 2015创建支持多选应用的超级安装程序
Hey Justin, let's figure out how to build that flexible multi-select installer with InstallShield—you were on the wrong track with prerequisites (those are for checking system requirements, not letting users pick which apps to install), but this is exactly what Features are designed for. Here's a step-by-step breakdown:
1. Create Independent Features for Each App
Each app you want users to choose gets its own dedicated Feature—this is the core of the multi-select functionality:
- Open your InstallShield project and switch to the Features view (look for it in the left-hand navigation pane).
- Right-click the default root Feature (usually named "MainFeature") and select New Feature. Repeat this to create three Features named
AppA,AppB, andAppC(use names that make sense for your users). - For each new Feature, go to its properties panel and make sure Visible is checked (so it shows up in the installer's selection screen). You can also add a clear Description (e.g., "Install Application A - Photo Editing Tool") to help users decide.
2. Assign App Files to Their Corresponding Features
Now link each app's installation files to its Feature so InstallShield knows what to install when a Feature is selected:
- Switch to the Files and Folders view.
- Locate all files associated with AppA (installer EXE, DLLs, resources, etc.). Right-click these files, select Assign to Feature, and pick
AppAfrom the list. - Repeat this process for AppB and AppC, making sure each app's files are only assigned to its own Feature (no cross-assigning unless intentional).
3. Customize the Feature Selection UI
Tweak the installer's selection screen to make it clear for users:
- Go to the Installer UI view, then navigate to Dialogs > Standard and find the Feature Selection dialog.
- Edit the dialog's title (e.g., "Choose Which Applications to Install") and prompt text to guide users. You can also adjust how Features are displayed (tree view vs. list) based on preference.
4. Add Dependencies (If Needed)
If one app relies on another (e.g., AppC requires AppA to be installed first), set up Feature dependencies:
- In the Features view, select the dependent Feature (e.g.,
AppC). - In the properties panel, find the Dependencies field and click the edit button. Add
AppAas a dependency—now if a user checks AppC, InstallShield will automatically select and install AppA too.
5. Test the Installer
- Compile your project to generate the installation package.
- Run the installer, only check boxes for AppA and AppB, and verify that post-install, only those two apps are present on the system (AppC should not be installed).
Quick Note on Why Prerequisites Didn't Work
Prerequisites are meant to enforce system requirements (like checking for .NET Framework 4.8) or install mandatory components that every user needs—they don't support user-driven selection. Features are the intended tool for letting users pick and choose which parts of your installer to run.
内容的提问来源于stack exchange,提问作者Justin CI

