Custom Disk Spanning

InstallShield 2024

In the Release Wizard, you will come across a panel that asks you how you would like to handle disk spanning. You can choose to let the wizard automatically span your installation across disks if necessary, or you can manually define the disk spanning. Although you cannot indicate where every file is placed, you can define the disk on which each feature resides. Components and files are automatically placed on the same disk as their feature. There are other guidelines that InstallShield automatically follows, whether you choose to define the layout or let the wizard do it for you.

In addition to defining the features that reside on each disk, you can customize the volume label for each disk, create your own disk prompts, and choose to have the wizard enforce the size of your disks. The step-by-step instructions for customizing your disk layout are outlined in the Release Wizard documentation.

Disk Prompts

Disk prompts are displayed to end users when they need to place another disk in the drive to continue with the installation. Although a standard disk prompt is provided, you can provide a prompt that is specific to your product.

The string that is displayed actually comes from a number of sources throughout your project, as described below:

1. The complete prompt originates in the Error table (exposed in the Direct Editor) as error 1302.
2. This value comes from the project’s list of string entries, and the default value for English is “Please insert the disk: [2].
3. Windows Installer resolves [2] with the value of the property DiskPrompt, which is set to [1] in the Property Manager.
4. Finally, Windows Installer evaluates [1] to the string you enter into the Disk Prompt field.

In most cases, you will want to enter the same name as the disk volume. For example, assuming the defaults are unchanged, a Disk Prompt entry of Disk8 would cause the user to be prompted with “Please enter the disk: Disk8.”

You can use a question mark where the disk number will be displayed. This question mark automatically evaluates to the correct disk number. If you want to prompt your users with, “Please insert the disk: DISK4,” you would enter DISK? for the fourth disk’s name. You need to specify the disk prompt for each disk in your installation.

Volume Labels

The volume label is the name of the disk on which your installation resides. When the installation calls for a new disk, the Windows Installer engine verifies that the volume label of the disk matches the volume label that is stored in the installation database. If the labels do not match, the service assumes that the wrong disk has been inserted in the drive. You can change the volume label when you customize your disk spanning options. The default volume label is DISK1, DISK2, DISK3, and so on. When you build your installation, you will see these directories created in your output location. The disks on which you put your setup need to have the volume labels set to the same names as given by the wizard.

Caution:You cannot change a volume label after the installation has been built. If you do not specify the correct volume label, the Windows Installer service will not recognize the disk and the installation will fail.

You can use a question mark to define the number of the disk. For example, if you want to set the volume label for your disks to InstallShield Disk 1, InstallShield Disk 2, and so on, you would rename every disk so that they read InstallShield Disk ?. At build time, this question mark evaluates to the disk number.

Enforce Disk Size

The Enforce Disk Size option helps you to ensure that your current layout fits on the disks that you have specified. If this option is not selected, and any disk that you want to create goes over the size of the media that you selected, the wizard automatically creates another disk and splits your features accordingly. If you select this option and the disk size exceeds the media size, the build will fail and you will receive build error 1531. You can then go back and trim down your feature size or try a different layout strategy.

Additional Information

If you add features to your installation after you have defined how you want your installation to span across multiple disks, those features are automatically added to the last disk of your installation. You can add new disks to your installation at any time by using the Release Wizard.