Configuring the TCP Port and Site Numbers

InstallShield 2019

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
Merge Module

InstallShield lets you specify the TCP port and site numbers for a Web site in your project. These settings help determine whether a new Web site is created or an existing one is updated at run time. They also affect whether the Web site settings that are configured in the Internet Information Services view are applied to a Web site on the target system.

To specify the TCP port and site numbers for a Web site:

1. In the View List under Server Configuration, click Internet Information Services.
2. In the Web Sites explorer, select the Web site that you want to configure.
3. Click the Web Site tab.
4. In the TCP Port Number and Site Number boxes, enter the appropriate numbers.

Run-Time Behavior

At run time, the installation creates the Web site, applications, and virtual directories according to the following rules:

Run-Time Results for Various Sample TCP Port Number and Site Number Setting Values

TCP Port Number Setting in InstallShield

Site Number Setting in InstallShield

Result at Run Time

0

Any non-zero number

Since the TCP Port Number setting is 0 but the Site Number setting is not 0, the installation installs the Web site’s applications and virtual directories to the first site number on the system. The specified site number is ignored.

For example, if the first site number on the target system is 1, the installation installs the Web site's applications and virtual directories under site number 1, even if a different non-zero number such as 3 is specified for the Site Number setting.

The installation does not apply any of the Web site settings that are configured in the Internet Information Services view to the Web site on the target system.

80 (a non-zero number)

0 (the default value)

If the specified TCP port exists on the target system, the installation installs the applications and virtual directories to the Web site that is running on the TCP port—in this example, port 80. The installation does not apply any of the Web site settings that are configured in the Internet Information Services view to the Web site on the target system.

If the TCP port does not exist on the target system, a new Web site is created with the Web site settings that are configured in the project. In addition, the installation installs the Web site’s applications and virtual directories.

81 (a non-zero number)

3 (a non-zero number)

If the specified TCP port and site number exist on the target system, the installation installs the applications and virtual directories under the Web site whose site number matches the specified one—in this example, site number 3. The installation does not apply any of the Web site settings that are configured in the Internet Information Services view to the Web site on the target system.

If the TCP port exists on the target system but the site number does not, the installation installs the new Web site, plus its applications and virtual directories, to the existing port with the new site number. In addition, the installation configures the Web site’s properties that are set in the Internet Information Services view.

If the TCP port does not exist on the target system but the site number does, the installation installs the new Web site, plus its applications and virtual directories, to this TCP port. In addition, the installation configures the Web site’s properties that are set in the Internet Information Services view.

Installing an IIS Web Site and Its Applications and Virtual Directories to the Next Available New Site Number

The following procedures demonstrate how to install an IIS Web site and its applications and virtual directories to the next available new site number. Note that the procedure differs, depending on the project type.

To install to the next available new site number for a Basic MSI, DIM, InstallScript MSI, or Merge Module project:

1. Create a new Windows Installer property and set its value to INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER:
a. In the View List under Behavior and Logic, click Property Manager.
b. Click the New Property button. InstallShield adds a new row at the bottom of the view.
c. In the Name column, type a new property; for example:

MYPROPERTY

d. In the Value column, enter the following value:

INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER

2. Specify the property for the Web site’s site number:
a. In the View List under Server Configuration, click Internet Information Services.
b. In the Web Sites explorer, select the Web site that you want to configure.
c. For the Site Number setting, enter the property that you created in step 1c. It must be in uppercase letters and enclosed within brackets; for example:

[MYPROPERTY]

At run time, the installation installs the Web site and its applications and virtual directories to the next available new site number.

To install to the next available new site number during an InstallScript installation:

1. Create a new string entry and set its value to INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER:
a. In the View List under User Interface, click String Editor.
b. Click the New String Entry button. The String Entry dialog box opens.
c. In the String Identifier box, enter a new variable name; the variable name must be in uppercase letters; for example:

MYPROPERTY

d. In the Value box, enter the following value:

INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER

2. Specify the variable for the Web site’s site number:
a. In the View List under Server Configuration, click Internet Information Services.
b. In the Web Sites explorer, select the Web site that you want to configure.
c. For the Site Number setting, enter the variable that you created in step 1c. It must be in uppercase letters.

At run time, the installation installs the Web site and its applications and virtual directories to the next available new site number.

See Also