Platform-dependent file installation

The best way to specify different installation folders for Windows 9x versus NT depends on the situation:

Same files, different folders

For example, to install a given set of files in one installation folder on Windows 9x, but in a different folder on Windows NT.

Solution: Use a platform-dependent project variable to designate the installation folder.

Different files, different folders

For example, to install one set of files for Windows 9x and another set for Windows NT, but in a different folder.

Solution: Use separate installation folders marked for the correct platforms.

Here are the details of the two approaches.

Platform-dependent project variable

To create a single installation folder that installs to a different location on Windows 9x than on Windows NT, acts as follows.

  1. Create a project variable to hold the two different installation paths. See Dealing With Common or Changeable Text Fragments for the correct procedure. In this example, we will assume that this variable is called AppAltFolder.
  2. Enter the installation path for use on Windows 9x in its Value (all or 9x) field. Use other project variables (for example, <ProgramFiles>, <WinDir>, or whatever is appropriate for your circumstances) to specify this path.
  3. Check the Value (NT) box and enter the installation path for use on Windows NT, again using other project variables to specify it.
  4. Switch to the Project - Files page.
  5. Create a blank installation folder directly underneath the Installation Files node. See Installing Files for the correct way to do this.
  6. Rename the newly created installation folder to <AppAltFolder> or whatever name you assigned to the project variable in step 1.
  7. Add the installation files to this new installation folder as per usual.

At installation time, Setup will resolve <AppAltFolder> depending on the customer's version of Windows and install the files accordingly. If necessary, the appropriate installation folder is created first.

Tip - If your main installation folder <AppFolder> must be platform-dependent, you can redefine it on the Advanced - Variables project page in the manner described above. This page gives you access to both the primary and alternate values; the Application folder field on the Installation page does not. In this case, you can simply add your installation files to the existing <AppFolder> node; there is no need to create a separate project variable or installation folder.

Separate installation folders

To install one set of platform-dependent files in one installation folder and another set in a different folder, acts as follows.

  1. Create the first installation folder as per Installing Files.
  2. In the Installation folder settings pane for the new folder, check or clear the appropriate Platforms boxes.
  3. Add the desired installation files to this folder; they will automatically be marked for the same installation platforms as the folder itself. (If necessary, click the Apply settings now button in the Installation Folder Settings pane for the new folder after adding all files.)
  4. Repeat steps 1-3 for the second installation folder.

At installation time, Setup will only install those files that are marked for the customer's version of Windows.