Redistributing the .NET Framework 1.1

 

Microsoft Corporation

Updated June 2003

This documentation is provided to you as part of Microsoft Visual Studio .NET 2003, Visual Basic .NET, Visual C++ .NET, Visual C# .NET, Visual J# .NET and/or the Microsoft .NET Framework SDK version 1.1 (any one of these, a "Microsoft Developer Tool"), specifically for your use in conjunction with the distribution or internal deployment of the Microsoft .NET Framework redistributable file (Dotnetfx.exe).

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Please refer to the end user license agreement you received with a Microsoft Developer Tool for information regarding distribution or internal deployment of the Dotnetfx.exe.

© 2003 Microsoft Corporation. All rights reserved.

Summary: Applications and controls written for the .NET Framework version 1.1 require the .NET Framework Redistributable Package version 1.1 to be installed on the computer where the application or control runs. The .NET Framework redistributable package is available as a stand-alone executable file, Dotnetfx.exe. This article describes where to obtain Dotnetfx.exe, and how to use it to deploy .NET Framework applications. (23 printed pages)

Note If you choose to use the Dotnetfx.exe or redistribute it with an application created by you, you must have a validly licensed copy of the Microsoft .NET Framework SDK (or Visual Studio .NET) and any use or distribution of Dotnetfx.exe is subject to the terms of the end user license agreement you received with the Microsoft .NET Framework SDK (or Visual Studio .NET). If you do not have a validly licensed copy of the Microsoft .NET Framework SDK (or Visual Studio .NET), you are not authorized to use or distribute Dotnetfx.exe.

Contents

Introduction
Where to Obtain the .NET Framework Redistributable Package
Dotnetfx.exe Deployment Scenarios
Installing Localized Versions of Dotnetfx.exe
Minimum Configuration Requirements

Introduction

The version 1.1 release of the Microsoft® .NET Framework provides one redistributable installer that contains the common language runtime and .NET Framework components that are necessary to run .NET Framework applications. The .NET Framework redistributable is available as a stand-alone executable file, Dotnetfx.exe. The .NET Framework requires a license agreement that gives you specific rights to redistribute Dotnetfx.exe. If you have previously installed the .NET Framework SDK version 1.1, Microsoft Visual Studio® .NET 2003, or downloaded Dotnetfx.exe from the Web, you have accepted the license agreement for Dotnetfx.exe. For the terms of the license agreement, see .NET Framework Redistributable EULA

You can manually launch and install Dotnetfx.exe on a computer, or it can be launched and installed as part of the setup program for a .NET Framework application. Note that administrator privileges are required to install Dotnetfx.exe. If you have previously installed Microsoft Visual Studio .NET 2003, you do not need to install Dotnetfx.exe.

In addition to this whitepaper, information about deploying Dotnetfx.exe is available from the .NET Framework 1.1 Deployment Guide. This Web site provides detailed deployment information including a whitepaper that addresses specific deployment scenarios for Visual Studio .NET users.

There are minimum configuration requirements that must be met in order to install Dotnetfx.exe. For more information about software and hardware requirements and recommendations, see Minimum Configuration Requirements.

Where to Obtain the .NET Framework Redistributable Package

Download Dotnetfx.exe or from the Microsoft® Windows Update Web site.

Alternately, you can get the redistributable package on a product CD or DVD. Dotnetfx.exe is available on the .NET Framework SDK CD in the dotNETRedist directory in the CD's root directory. It is available on the Microsoft® Visual Studio® .NET Prerequisites CD in the \dotNetFramework directory, and on the Microsoft Visual Studio® .NET DVD in the \wcu\dotNetFramework directory.

The .NET Framework SDK page on MSDN has information on how to order these products.

If you need to have users install the .NET Framework from the Internet, do not post the .NET Framework Redistributable Package; instead direct users to the Microsoft Windows Update Web site.

Dotnetfx.exe Deployment Scenarios

This section provides .NET Framework SDK users with deployment scenarios for redistributing the .NET Framework using Dotnetfx.exe. Scenarios are provided for deploying Dotnetfx.exe using an electronic software distribution tool, manually installing from a download location on a network share, intranet, or the Microsoft Web site, and using the Setup.exe Bootstrapper sample to create a single setup project to install both Dotnetfx.exe and a .NET Framework application. Because Dotnetfx.exe is a significant runtime component, you must have administrator privileges in order to install it on a computer.

Distributing Dotnetfx.exe Using an Electronic Software Distribution Tool

Corporations that deploy .NET Framework applications will find it easier to deploy the .NET Framework once to all users' computers, rather than including it with each application that requires it. Various electronic distribution tools are available for deploying Dotnetfx.exe and, when necessary, MDAC 2.6 or later across a secure network. There are two requirements for any tool that you use to distribute Dotnetfx.exe:

  1. The tool must be capable of running a remote installation on a remote computer
  2. The tool must be able to run with administrator privileges.

This following section describes how to use Microsoft Systems Management Server (SMS) and Microsoft Active Directory® to deploy the .NET Framework redistributable package across a network.

Deploying the .NET Framework using Systems Management Server

Systems Management Server (SMS) allows you to deploy software with administrative privileges across a network. This section describes the specific procedures for using SMS to deploy the Windows Installer setup package for Dotnetfx.exe across a network. For additional SMS product information and documentation, see the Systems Management Server Home Page and Deploying Windows Installer Setup Packages with Systems Management Server 2.0.

In addition, there are minimum configuration requirements that must be met in order to install the .NET Framework on a computer. For specific software and hardware requirements and recommendations, see Minimum Configuration Requirements.

After the network administrator has ensured that all networked computers on which Dotnetfx.exe will be installed meet the minimum configuration requirements, the following five tasks and their individual procedures must be performed on the SMS Server. These procedures must be performed in the order in which they are presented.

First, extract the Dotnetfx.exe file that you will use to deploy the .NET Framework.

To extract the Dotnetfx.exe file to deploy the .NET Framework

  1. Download Dotnetfx.exe to the root directory of the C:\ drive on your local computer.
  2. Open a command prompt.
  3. Change the directory to the root of the C:\ drive.
  4. Type mkdir dotnetfx at the command prompt to create a directory in which to copy Dotnetfx.exe.
  5. Type dotnetfx.exe /q /c:"msiexec /qb /a netfx.msi TARGETDIR=c:\dotnetfx" at the command prompt to extract the files to the dotnetfx directory.
  6. Close the command prompt window.
  7. Navigate to the C:\dotnetfx folder in Windows Explorer and verify that the files were extracted.
  8. Move the dotnetfx folder and all its contents to the server that you will use for deployment.

After you have moved the dotnetfx folder to the proper location for deployment, the next step is to create an Active Directory package for the .NET Framework.

To create a .NET Framework package

  1. Open the SMS Administrator console. Click Start, point to Programs, and choose Systems Management Server.

  2. Expand the Site Database node, and right-click the Packages node in the Site Database tree.

  3. From the Action menu, point to New, and choose Package. The Package Properties dialog box is displayed.

  4. In the Package Properties dialog box, click the General tab and complete the information as follows:

    Name: .NET Framework
    Version: 1.1.4322
    Publisher: Microsoft
    Language: English

  5. In the Package Properties dialog box, click the Data Source tab.

  6. Click the This package contains source files check box.

  7. Click the Always obtain files from source directory option button.

  8. Click the Set button. The Set Source Directory dialog box is displayed.

  9. In the Set Source Directory dialog box, click the Local drive on site server OR Network Path (UNC Name) option button. (This depends on how one wants to share out the deployable program.)

  10. Click the Browse button. The Browse for Folder dialog box is displayed.

  11. Select the C:\DotNetFx directory or provide server location (\\<servername>\<foldername>), where you extracted the files to previously.

  12. In the Browse for Folder dialog box, click OK.

  13. In the Set Source Directory dialog box, click OK.

  14. In the Package Properties dialog box, click OK.

Next, create a .NET Framework program for the .NET Framework package. Each SMS package contains at least one SMS program, which is a command line that runs on each targeted computer to control the execution of the package.

To create a program for the .NET Framework package

  1. Expand the Microsoft .NET Framework <version#> English node, located under the Packages node.

  2. Right-click Programs, point to New, and choose Program. The Program Properties dialog box is displayed.

  3. In the Program Properties dialog box, click the General tab and complete the information as follows:

    Name: .NET Framework Program
    Command line: msiexec /i netfx.msi /q ARPSYSTEMCOMPONENT=1

    Optional arguments ARPNOREMOVE=1

  4. In the Program Properties dialog box, click the Environment tab.

  5. Clear the User input required check box.

  6. Click the option button Run with administrative rights.

  7. Click OK.

Next, create a distribution point for the .NET Framework package. SMS Distribution Points are shares on site systems where package source files are copied for access by client computers.

To create a .NET Framework distribution point

  1. Right-click Distribution Points, located under the Microsoft .NET Framework <version#> English node.
  2. Select New, and choose Distribution Points. The New Distribution Points Wizard appears.
  3. In the New Distribution Points Wizard dialog box, click the Next button.
  4. Select the distribution point to which you want to copy the .NET Framework package.
  5. Click Finish to start the distribution.

Finally, create an advertisement for the .NET Framework program. An advertisement specifies the program that is available to client computers, which computers will receive the advertisement, and when the program will be scheduled for installation.

To create a .NET Framework advertisement

Note You could set a schedule before creating an assignment, which helps in setting a time for when the package will be deployed on target machines. It can be set by going to the Schedule tab and creating a mandatory assignment for the current time (or schedule one for later time).

  1. In the Site Database tree, right-click the Advertisements node
  2. Select New, and choose Advertisement. The Advertisement Properties dialog box is displayed.
  3. In the Advertisement Properties dialog box, complete the information in the General tab as follows:
    • Type ".NET Framework Advertisement" in the Name section.
    • Select Microsoft .NET Framework <version#> English from the Package drop-down list.
    • Select .NET Framework Program from the Program drop-down list.
  4. Click the Browse button and select the appropriate collection of computers on which to deploy the .NET Framework.
  5. Click OK.

Deploying the .NET Framework using Active Directory

Active Directory allows you to deploy software with administrative privileges across a network. This section describes the specific procedures for using Active Directory to deploy the Windows Installer setup package for Dotnetfx.exe across a network. For additional Active Directory product information and documentation, see the Active Directory Home Page.

To deploy the .NET Framework redistributable package, Dotnetfx.exe, with administrator privileges, you must extract the Windows Installer file, netfx.msi, from the Dotnetfx.exe file. Netfx.msi is the file you will use to deploy the .NET Framework.

Before you can install a Windows Installer setup package on an Active Directory client computer, the client computer must have the Windows Installer installation service installed. The procedure described in this section assumes that Windows Installer 2.0 is installed on all client computers prior to the deployment of Dotnetfx.exe. Windows Installer 2.0 is available for download from the Microsoft Download Center. Note that these installer files are not designed for deployment using Active Directory. They must either be installed on each computer individually or electronically using Systems Management Server.

In addition, there are minimum configuration requirements that must be met in order to install the .NET Framework on a computer. For specific software and hardware requirements and recommendations, see Minimum Configuration Requirements.

After the network administrator has ensured that all networked computers on which Dotnetfx.exe will be installed meet the minimum configuration requirements, perform the following tasks and their individual procedures in the order presented.

First, extract the Dotnetfx.exe file that you will use to deploy the .NET Framework.

To extract the Dotnetfx.exe file to deploy the .NET Framework

  1. Download Dotnetfx.exe to the root directory of the C:\ drive on your local computer.
  2. Open a command prompt.
  3. Change the directory to the root of the C:\ drive.
  4. Type mkdir dotnetfx at the command prompt to create a directory in which to copy Dotnetfx.exe.
  5. Type dotnetfx.exe /q /c:"msiexec /qb /a netfx.msi TARGETDIR=c:\dotnetfx" at the command prompt to extract the files to the dotnetfx directory.
  6. Close the command prompt window.
  7. Navigate to the C:\dotnetfx folder in Windows Explorer and verify that the files were extracted.
  8. Move the dotnetfx folder and all its contents to the server that you will use for deployment.

After you have moved the dotnetfx folder to the proper location for deployment, the next step is to create an Active Directory package for the .NET Framework.

To create a .NET Framework package in Active Directory

  1. Click the Start button, point to Programs, and then point to Administrative Tools. Click Active Directory Users and Computers. The Active Directory Users and Computers tree is displayed.

  2. Right-click the domain node at the top of the tree. Click Properties on the shortcut menu. The Properties dialog box is displayed.

  3. Click the Group Policy tab.

  4. Click the Edit button. A window is displayed with the Default Domain Policy tree.

  5. There are two alternatives when choosing how the software will be assigned. You can select the Computer Configuration node in Group Policy to set policies that are applied to computers, regardless of who logs on to them. Alternatively, you can select the User Configuration node in Group Policy to set policies that apply to users, regardless of the logon computer. For the purpose of the example, select and expand the User Configuration node. Expand the Software Settings folder located under the User Configuration node.

    Note Ensure that you map to the shared location on the Active Directory server; otherwise, it will not let you create a package for installation.

  6. Right-click Software installation. Point to New, and then click Package on the shortcut menu.

  7. A dialog box is displayed that prompts you for the path to the Windows Installer file (.msi) for the package. Browse to the location where you copied the dotnetfx folder, and click the netfx.msi file.

  8. Choose the Advanced Published or Assigned selection and click the OK button.

  9. A window is displayed where you can choose to auto install or publish the software. If you choose Auto Install, the software will be installed automatically on every computer in the domain. If you choose Publish, the software is added to the list of available products, but is not installed unless a user chooses to install it. After you have modified all necessary items, click the OK button.

  10. Exit the Active Directory Users and Computers console.

Alternatively, if you selected the User Configuration node in Group Policy to set policies that apply to users, regardless of the logon computer, follow these steps:

  1. Right-click Software installation. Point to New, and then click Package on the shortcut menu.
  2. A dialog box is displayed that prompts you for the path to the Windows Installer file (.msi) for the package. Browse to the location where you copied the dotnetfx folder, and click the netfx.msi file.
  3. Select Advanced Published or Assigned and click OK.
  4. A window is displayed where you can choose to auto install or publish the software. If you choose Auto Install, the software will be installed automatically on every computer in the domain. If you choose Publish, the software is added to the list of available products, but is not installed unless a user chooses to install it. After you have modified all necessary items, click OK.
  5. Exit the Active Directory Users and Computers console.

After you complete the setup of the .NET Framework package in Active Directory, the next step is to verify that the package is available for installation.

Setting the Elevated Privileges via Group Policy

Since . NET Framework package (like most packages) only allows local administrators of the machine to install the package, you should use elevated privileges to advertise the package per-machine in Group Policy.

As an administrator you can create policies for one user, one computer, or a group of users. See the System Policy Editor Help for more information on creating special policy profiles. Also, see the Group Policy snap-in Help for more information on configuring policies.

Follow these steps to set this policy for deploying . NET Framework:

  1. On the Start menu, point to Programs, then Administrative Tools, and then click Active Directory Users and Computers.

  2. In the console tree, right-click the domain or organizational unit for which you want to set the policy.

  3. Click Properties, and then click the Group Policy tab.

  4. Select a Group Policy Object in the Group Policy Objects Links box and click Edit.

  5. Open the Local Computer Policy\Administrative Templates\Windows Component\Windows Installer folder.

  6. In the details pane, double-click the Always install with elevated privileges policy.

  7. In the Group Policy Property dialog box, enable the policy, select the check box to turn the setting on, and then click OK.

  8. Open the User Configuration\Administrative Templates\Windows Component\Windows Installer folder and repeat Steps 6 and 7.

    You can use the System Policy Editor and Windows Installer policy to set the Always install with elevated privileges policy.

Verification that package is ready to be assigned to machines

After you complete the setup of the .NET Framework package in Group Policy, the next step is to verify that package is available for installation. To follow are instructions on how administrators need to modify settings for the newly created package within Active Directory.

General tab

Once you have assigned the .NET Framework package, relevant information about the package is automatically displayed on the General tab.

Deployment tab

On the Deployment tab, you can specify whether to publish or assign .NET Framework. Note that if an administrator chooses to open the snap-in under Computer Configuration, the Published option is unavailable.

Under Deployment options, select check boxes to specify when and how the .NET Framework is installed on users' computers. You can set any of the following options:

  • Install the .NET Framework automatically when users open a file associated with a .NET Framework application. This setting is turned on by default.
  • For other options please check for details in the Group Policy Help and ensure we provide coverage on those areas.

Under Installation user interface options, you can specify how much of the .NET Framework Setup is displayed to users during the installation process. The recommended setting (and the default) is Basic, which installs Redist quietly and requires no user interaction. (The Basic setting corresponds to the /qb- command-line option.).

To set additional deployment options, click Advanced. In the Advanced Deployment Options dialog box, you can:

  • Specify that Windows 2000 or .NET Server should install Redist even if the Redist installation language differs from the Windows 2000 or .NET Server's installation language.
  • Remove unmanaged Redist installations when you deploy Redist through Group Policy software installation and maintenance.

Upgrades tab

If you are already managing a .NET Framework installation, you can use the Upgrades tab to deploy a new version of the product.

Categories tab

Associating the .NET Framework with a category can make the .NET Framework appear in Add/Remove Programs in Control Panel when using publishing.

Modifications tab

Use the Modifications tab to apply a transform (.mst file) to your .NET Framework (if any). Click Add, select your transform, and then click Open to add it to the Modifications tab.

Note that you can add multiple transforms, but you can apply only one transform to a given .NET Framework installation, and you can apply the transform only when you assign the .NET Framework.

Security tab

The Security tab displays standard Windows-based security options. You can fine-tune your .NET Framework deployment by filtering the Group Policy software installation settings through ACLs.

To verify an Active Directory package

  1. Log on to any computer that is a part of the domain. Click the Start button, point to Control Panel, and then click Add or Remove Programs.
  2. Click the Add New Programs button. The .NET Framework installation package should appear in the list of available software.
  3. If the .NET Framework installation package does not appear in the list of available software, the package is incorrectly configured in Active Directory. Return to the Active Directory Users and Computers console and double-click the package to reconfigure it.

If the network administrator chooses the Publish option when creating the .NET Framework package in Active Directory, the package is added to the list of software available to computers in the domain. Users who want to install the package can follow these procedures on a client computer

To install the .NET Framework package

  1. Click the Start button, point to Control Panel, and then click Add or Remove Programs.

  2. Click the Add New Programs button.

  3. In the list of available software, select the .NET Framework package and click the Add button. This will launch Microsoft .NET Framework Setup.

    Note   Windows Installer 2.0 must be installed on the client computer prior to launching Microsoft .NET Framework Setup. Setup will fail if Windows Installer 2.0 is not installed.

  4. When the installer displays the Microsoft .NET Framework Setup window, click the Next button.

  5. To proceed with installation, click the Accept option button, and then click the Next button. The installer will begin to copy files and update the system.

  6. When installation is complete, the installer displays a dialog box. Click the OK button.

Note   To properly uninstall the .NET Framework package, you should also use the Windows Add or Remove Programs option.

Manually Installing Dotnetfx.exe from a Network Share or Intranet Site

You can direct users to a download location for Dotnetfx.exe on a network share or a corporate intranet site. A user can run and install Dotnetfx.exe on the computer on which they want to deploy and run a .NET Framework application. Note that in order to install Dotnetfx.exe, you must have administrator privileges on the computer.

It is also recommended that MDAC 2.6 or later be installed for any application that includes data access. MDAC is available for download from Data Access Downloads on MSDN.

Manually Installing Dotnetfx.exe from the Microsoft Web site

You can direct users to a download location for Dotnetfx.exe on the Microsoft Download Center or a location on the Microsoft Windows Update Web site. A user can run and install Dotnetfx.exe on the computer on which they want to deploy and run a .NET Framework application. Note that in order to install Dotnetfx.exe, you must have administrator privileges on the computer.

The .NET Framework also requires that MDAC 2.6 or later be installed for any application that includes data access. MDAC is available for download from Data Access Downloads on MSDN.

A silent install suppresses the display of all user interface and error messages returned by Dotnetfx.exe and Install.exe, which is contained within Dotnetfx.exe. Specifying the /q:a and /q options for a silent install allows for a standardized user installation experience. Specifying the /l option creates a setup log file, netfx.log, in the %temp% directory where all errors are logged.

Creating a Single Setup Project to Install a .NET Framework Application and Dotnetfx.exe

The purpose of the Setup.exe Bootstrapper sample is to demonstrate how to create a single setup program that, when launched, installs the .NET Framework redistributable package Dotnetfx.exe, if necessary, and then installs a .NET Framework application. This sample bootstraps Dotnetfx.exe and a .NET Framework application's Microsoft Windows Installer-based setup program (.msi file). This sample is written in unmanaged code because it must be able to run on a computer where the .NET Framework is not installed. You can download a precompiled version of the Setup.exe.

The .NET Framework requires that MDAC 2.6 or later be installed for any application that includes data access. Microsoft provides MDAC_typ.exe, a stand-alone executable file that can be run to install MDAC. It is available for download from Data Access Downloads on MSDN. For .NET Framework applications that include data access, you can extend the Setup.exe Bootstrapper sample to silently install MDAC_typ.exe by checking for the existence of the registry key HKLM\SOFTWARE\Microsoft\DataAccess where the value of FullInstallVer is 2.6 or later. You can download a sample executable file that encapsulates the MDAC installation with a Windows Installer package (.msi file) from Install DCOM and MDAC Through a Windows Installer Package.

The Setup.exe Bootstrapper sample performs the following actions:

  1. Checks to see if version 1.1 of the .NET Framework is installed on the target computer.
  2. If the specified version is not installed, it launches an installation of Dotnetfx.exe and, if necessary, upgrades to Windows Installer 2.0. A computer reboot might be required.
  3. Checks to see if any specified .NET Framework 1.1 language packs are installed.
  4. If the specified language packs are not installed, it launches an installation of the required language packs.
  5. Installs the host .NET Framework application. If a computer reboot is required, it is suppressed until the host application is finished installing.

Note The Setup.exe Bootstrapper sample does not check for common error codes. The Setup.exe Bootstrapper simply launches the .NET Framework version 1.1 Setup, if necessary, and any accompanying language packs as determined by the settings.ini file. All installs are in full UI mode, and any errors or issues encountered by the .NET Framework version 1.1 Setup or language pack Setup will be displayed to the user.

Detecting that the .NET Framework 1.1 is installed

The Setup.exe Bootstrapper sample demonstrates the code to use to wrap a Setup program to verify if the .NET Framework is installed.

Note The same registry key will be checked for all versions of Dotnetfx.exe regardless of language. Therefore, if you want to display dialogs in a specific language you should use the corresponding version of Dotnetfx.exe. You do not need to make any changes to the settings.ini file when deciding which version of Dotnetfx.exe to use.

The Setup.exe bootstrapper sample uses the following registry key to detect the .NET Framework version 1.1.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322

It then verifies the existence of the entry value:

Install (DWORD value = 1)

.NET Framework version 1.1 Language Packs are detected using the registry keys from the .NET Framework Registry Locations table.

Calling an MSI setup for an application and suppressing reboot until the application is installed

The following command calls the MSI setup for the host application myapp.msi. The REBOOT=ReallySuppress option suppresses a computer reboot until myapp is finished installing.

msiexec /i myapp.msi REBOOT=ReallySuppress

Note that the Setup.exe Bootstrapper sample does not need to check for error codes generated by the host application, myapp, or dotnetfx.exe because this is not a silent install and all errors are displayed to the user through the Windows Installer user interface.

Creating the Settings.ini file

The Setup.exe Bootstrapper sample uses the external file, Settings.ini, to determine the following:

  • The location of Dotnetfx.exe and the host application
  • The language pack being installed
  • Custom strings to use for Setup.exe dialog boxes

The default location for settings.ini is in the same folder as Setup.exe. You can copy the settings.ini file provided with the Setup.exe Bootstrapper sample and then edit the file as necessary to specify the correct values for your application.

Specify the location of Dotnetfx.exe and the host application

The Setup.exe Bootstrapper sample requires Dotnetfx.exe and the host .NET Framework application to be in a known location relative to Setup.exe. The Setup.exe Bootstrapper assumes that Dotnetfx.exe is in the same directory in which it is stored.

The following examples of settings.ini files illustrate how to point to a Windows Installer package (.msi file) for a host .NET Framework application and Dotnetfx.exe in various locations relative to the location of Setup.exe.

The following example settings.ini file points to the Windows Installer package for a .NET Framework application, mySetup.msi, and Dotnetfx.exe located in the same folder as Setup.exe.

[Bootstrap]
Msi=mySetup.msi
ProductName= My Application 
DialogText=
CaptionText=My Application
ErrorCaptionText= My Application Error
FxInstallerPath=c:\myProjectFolder\

The following example settings.ini file points to the Windows Installer package for a .NET Framework application, mySetup.msi, and Dotnetfx.exe located on a network share, separate from Setup.exe.

[Bootstrap]
Msi=\\myNetworkShare\myProjectFolder\mySetup.msi
ProductName=My Application
'DialogText=
CaptionText=My Application
ErrorCaptionText= My Application Error
FxInstallerPath=\\myNetworkShare\myProjectFolder\

The following example settings.ini file points to the Windows Installer package for a .NET Framework application, mySetup.msi, and Dotnetfx.exe located on the same computer as Setup.exe, but in different folders.

[Bootstrap]
Msi=c:\myInstallerFiles\mySetup.msi
ProductName= My Application
'DialogText=
CaptionText=My Application
ErrorCaptionText= My Application Error
FxInstallerPath=c:\myExecutables\

The following example settings.ini file points to the Windows Installer package for a .NET Framework application, mySetup.msi, and Dotnetfx.exe located on the same CD as Setup.exe, but in different folders.

[Bootstrap]
Msi=myInstallerFiles\mySetup.msi
ProductName= My Application
'DialogText=
CaptionText=My Application
ErrorCaptionText= My Application Error
FxInstallerPath=myExecutables\

Specify the language pack to be installed

If you want to install the .NET Framework version 1.1 and language packs you will need to specify this in the settings.ini file in the [LangPacks] section. The way in which you specify what language you want to install is by listing the Locale ID number (LCID).

Along with specifying the LCID of your choice, you will also need to make a folder in the same directory in which you placed Dotnetfx.exe that matches the name of the LCID listed in the settings.ini file. For example, to install the Japanese language pack you would need to list LCID 1041 in the [LangPacks] section and also make a folder called 1041 that is the in the same directory as Dotnetfx.exe. You can install multiple language packs using the same settings.ini file.

Table 1 lists the available language versions and the LCID to specify in the Settings.ini file.

Table 1. Available Language Versions and LCID Specifications for the Settings.ini File

Language LCID
Chinese (Simplified) 2052
Chinese (Traditional) 1028
Czech 1029
Danish 1030
Dutch 1043
Finnish 1035
French 1036
German 1031
Greek 1032
Hungarian 1038
Italian 1040
Japanese 1041
Korean 1042
Norwegian 1044
Polish 1045
Portuguese (Brazilian) 1046
Portuguese (Portugal) 2070
Russian 1049
Spanish 3082
Swedish 1053
Turkish 1055

The settings.ini file included with the sample has all of the supported language packs and corresponding LCIDs listing in the [LangPacks] section. If you would like to install a language pack simply remove all characters surrounding the chosen LCID, and only list the LCID required.

The following example settings.ini file instructs Setup.exe to check for the French language pack.

[Bootstrap]
Msi=mySetup.msi
ProductName= My Application 
'DialogText=
CaptionText=My Application
ErrorCaptionText= My Application Error
FxInstallerPath=c:\myProjectFolder\
[LangPacks]
1036

Customize strings for Setup.exe dialog boxes

You can edit the following variables in the settings.ini file to customize strings displayed in Setup.exe dialog boxes.

  • ProductName
    Specifies the name of the .NET Framework application Setup.exe will install. The product name that you specify is used to customize the text in the dialog box that appears after launching Setup.exe. For example, if you specify My Application as ProductName, the dialog box text reads, "To start My Application Setup, click OK. To quit without installing, click Cancel."

    If you do not customize the CaptionText variable, ProductName is also used to customize the title bar for the dialog box that appears after launching Setup.exe. For example, if you specify My Application as the ProductName, the title bar displays "My Application Setup." If you customize both ProductName and CaptionText, CaptionText is used to customize the title bar text in this dialog box.

    ProductName is also used to customize the title bar text in the success dialog box displayed when the application is finished installing. If you do not customize ProductName, the default text "Application Setup" is displayed.

  • DialogText
    Specifies the custom text to display in the dialog box that is displayed after launching Setup.exe. If you do not customize DialogText, the default text "To start Application Setup, click OK. To quit without installing, click Cancel" is displayed.

  • CaptionText
    Specifies the custom text to display in the title bar of the dialog box that appears after launching Setup.exe. If you do not customize CaptionText, ProductName is displayed. If ProductName is not customized, the default text "Application Setup" is displayed.

  • ErrorCaptionText
    Specifies the custom text to display in the title bar of Setup.exe error dialog boxes. If you do not customize ErrorCaptionText, the default text "Application Setup Error" is displayed.

Creating a readme file for a Setup program

It is recommended that you distribute your Setup program with a readme file that lists the minimum configuration requirements for the computer on which the Setup program can successfully run. At a minimum, list Microsoft Windows 98 or later with Internet Explorer 5.01 or later installed as a requirement prior to installation. You should also list MDAC 2.6 or later, noting that it is not required for installation, but is required for .NET Framework applications that include data access. For more information on the minimum configuration requirements for installing Dotnetfx.exe, see Minimum Configuration Requirements.

Launching a Silent Installation of Dotnetfx.exe and Language Packs

The following command launches a silent installation of Dotnetfx.exe:

dotnetfx.exe /q:a /c:"install /l /q"

The following command launches a silent installation of Langpack.exe (any language pack):

LangPack.exe /q:a /c:"inst /l /q"

How to Determine If the .NET Framework, J# Redistributable Package, or Language Pack Installed Successfully From a Setup Package That Installs It As a Prerequisite

Several means exist to determine the success or failure of the setup for the .NET Framework, the J# redistributable package, or language packs. The recommended algorithm is to check the return code from the setup package as well as to validate that the product-specific registry key exists on the machine (a combination of items 1 and 2 that are described in more detail below). This approach guards against misleading return codes and orphaned registry keys on the machine while eliminating the need to parse log files searching for return codes.

Capture the return code from the setup process

If a setup spawns the .NET Framework or J# redistributable package setup using CreateProcess or a similar API, it can wait for the setup to finish and then check the return code to determine success or failure.

A return code of 0 indicates success for the .NET Framework or J# redistributable package setup. A return code of 3010 indicates success with a reboot requested, and the calling application should reboot before proceeding. All other return codes indicate some sort of error during setup.

Check a version-specific registry key that should be written by setup

Starting with the .NET Framework 1.1 and the J# redistributable package 1.1, a centralized registry hive is created during setup to indicate information about the versions of the .NET Framework and J# redistributable package installed on a machine.

Table 2 lists each of the products along with the registry values that can be checked to determine whether or not the product is installed on a given machine:

Table 2. .NET Framework Registry Locations

Product Registry Value
.NET Framework Version 1.1 Redistributable HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322

Install (DWORD value = 1)

Chinese (Simplified) Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\2052

Install (DWORD value = 1)

Chinese (Traditional) Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1028

Install (DWORD value = 1)

Czech Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1029

Install (DWORD value = 1)

Danish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1030

Install (DWORD value = 1)

Dutch Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1043

Install (DWORD value = 1)

Finnish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1035

Install (DWORD value = 1)

French Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1036

Install (DWORD value = 1)

German Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1031

Install (DWORD value = 1)

Greek Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1032

Install (DWORD value = 1)

Italian Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1040

Install (DWORD value = 1)

Japanese Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1041

Install (DWORD value = 1)

Korean Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1042

Install (DWORD value = 1)

Norwegian Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1044

Install (DWORD value = 1)

Polish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1045

Install (DWORD value = 1)

Portuguese (Brazilian) Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1046

Install (DWORD value = 1)

Portuguese (Portugal) Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\2070

Install (DWORD value = 1)

Russian Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1049

Install (DWORD value = 1)

Spanish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\3082

Install (DWORD value = 1)

Swedish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1053

Install (DWORD value = 1)

Turkish Language Pack HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1055

Install (DWORD value = 1)

Table 3. J# .NET Registry Locations

Product Registry Value
J# .NET Version 1.1 Redistributable HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322
J# .NET Chinese (Simplified) Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\2052

Install (DWORD value = 1)

J# .NET Chinese (Traditional) Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1028

Install (DWORD value = 1)

J# .NET French Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1036

Install (DWORD value = 1)

J# .NET German Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1031

Install (DWORD value = 1)

J# .NET Italian Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1040

Install (DWORD value = 1)

J# .NET Japanese Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1041

Install (DWORD value = 1)

J# .NET Korean Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\1042

Install (DWORD value = 1)

J# .NET Spanish Language Pack HKEY_LOCAL_MACHINE\Software\Microsoft\Visual JSharp Setup\Redist\v1.1.4322\3082

Install (DWORD value = 1)

Note In Table 3, the [LCID] portion of the key names represents a 4-digit number that is the language code for the language pack in question. For example, the language code for English is 1033 and the language code for Japanese is 1041.

Parse the log file created by the wrapper Install.exe or Inst.exe

This log file is created anytime the .NET Framework or J# redistributable package is installed by using the redistributable setup executable. Table 4 lists products and the corresponding log file names:

Table 4. Products and Corresponding Log File Names

Product Executable Name Log File Name
.NET Framework Dotnetfx.exe Dotnetfx.log
.NET Framework Language Pack Langpack.exe Langpacksetup.log
J# Redistributable Package Vjredist.exe Jsredistsetup.log
J# Redistributable Package Language Pack Vjredist-LP.exe Jsredistsetup.log

Each of the above log files are found in the %temp% directory for the currently logged-in user after the corresponding setup has completed. The following entries in the log file will indicate the return codes from Windows Installer and from the wrapper itself:

[MsiInstallProduct]
ReturnCode=0

[Install.exe]
ReturnCode=0

Both of these return codes can be parsed out of the log file by using GetPrivateProfileString API calls.

A return code of 0 indicates success for the .NET Framework or J# redistributable package setup. A return code of 3010 indicates success with a reboot requested, and the calling application should reboot before proceeding. All other return codes indicate some sort of error during setup.

Parse the log file created by passing the verbose logging switch to the setup package

Whenever you launch an installation of the .NET Framework, J# redistributable package, or language pack, you should pass the /l switch to enable verbose logging. By doing this, the setup package will create a log file in the %temp% directory by default. This will allow for more detailed debugging of any failures without requiring the user to set a registry key to enable logging, re-run the setup, and reproduce the failure in order to produce verbose log files. Table 5 lists the command line switches that will enable verbose logging and the location of the log files produced during setup. Note that verbose logging only minimally impacts installation time, so your users will not incur a noticeable performance hit if you use the /l switch.

Table 5. Products, Command Line Syntax, and Default Locations for Verbose Log Files

Product Command line syntax Log file location
.NET Framework dotnetfx.exe /c:"install.exe /l" %temp%\netfx.log
.NET Framework Language Pack langpack.exe /c:"inst.exe /l" %temp%\langpackmsi.log
J# Redistributable Package vjredist.exe /c:"inst.exe /l" %temp%\jsredistmsi.log
J# Redistributable Package Language Pack Vjredist-LP.exe /c:"inst.exe /l" %temp%\jsredistmsi.log

Note   The log file location can be controlled by passing a full path after the /l switch to Install.exe or Inst.exe. The locations listed in the table are the default locations if no path is provided.

The following is an example entry in Netfx.log that indicates the return code from Windows Installer:

MSI (c) (90:9C): MainEngineThread is returning 0

A return code of 0 indicates success for the .NET Framework or J# redistributable package setup. A return code of 3010 indicates success with a reboot requested, and the calling application should reboot before proceeding. All other return codes indicate some sort of error during setup.

Use Windows Installer API calls to validate that the .NET Framework is installed on the machine

The product code for the setup package (as listed in the property table of the product's MSI file) can be passed to the Windows Installer API MsiQueryProductState to determine whether or not the product is installed on the machine.

Note This method will not work for the .NET Framework 1.1 on Windows Server 2003 because it is installed on the machine by the OS itself, and therefore is not registered as an installed product by Windows Installer.

Installing Localized Versions of Dotnetfx.exe

The .NET Framework redistributable (Dotnetfx.exe) is available in 22 language versions. All versions of Dotnetfx.exe are the same programmatically, the only difference between each of the 22 versions is the user interface displayed during installation. For example, when installing a Japanese language version of dotnefx.exe on an English language machine all of the installation dialogs and the end user license agreement (EULA) will be in Japanese, but the code itself isn't localized and all dialogs displayed by the .NET Framework will be in English. Therefore, if you wish to see installation dialogs in a specific language, you should install the corresponding version of Dotnetfx.exe.

In order to have Japanese dialogs displayed by the .NET Framework version 1.1 you will also have to install a corresponding language pack. A .NET Framework version 1.1 language pack only contains localized resources (such as error messages) but changes nothing programmatically in the .NET Framework version 1.1.

There are 21 language packs available for the .NET Framework version 1.1 and all 21 can be installed on the same machine. However, there isn't an English Language pack due to the fact that Dotnetfx.exe already has all error codes and messages in English by default.

In every case possible the localized version of Dotnetfx.exe and the matching language pack should be installed on localized machines. This means that you should install the dotentfx.exe that has been localized into Japanese as well as the Japanese language pack when installing onto a Japanese machine.

Note When installing a .NET Framework language pack on a computer running the Windows 98 or Windows Me operating system, the system code page and font must support the language pack being installed. There are several options:

  • Install the same language pack as the language of Windows. For example, install the Japanese Language Pack on the Japanese version of Windows 98.

  • Install a localized version of the language pack on a localized version of Windows, in which the system code page is the same for both languages. For example, install the French Language Pack on the German version of Windows 98.

  • Install the .NET Framework version 1.1 on any localized version of Windows. If the system code page and font do not support the language of the .NET Framework language pack being installed, dialogs will not display correctly. For example, when installing the Japanese Language Pack on the English version of Windows 98, setup dialogs will not display text correctly.

    This limitation applies only to Windows 98 and Windows Me systems. You can install any .NET Framework language pack on any language version of Windows 2000, Windows NT 4.0, Windows XP, or the Windows Server 2003 family.

Minimum Configuration Requirements

This section describes the minimum configuration requirements for a computer where the .NET Framework redistributable package is to be installed. If the minimum requirements are not met, Dotnetfx.exe setup will block the installation of the redistributable package. Specifically, note that you cannot install the .NET Framework redistributable package on a computer running the Microsoft Windows 95 operating system.

Platform and Software Requirements

Minimum requirements

To install Dotnetfx.exe, you must have one of the following operating systems with Microsoft Internet Explorer 5.01 or later installed on your computer:

  • Microsoft Windows 98
  • Microsoft Windows 98 Second Edition
  • Microsoft Windows Millennium Edition (Windows Me)
  • Microsoft Windows NT 4 (Workstation or Server) with Service Pack 6a
  • Microsoft Windows 2000 (Professional, Server, or Advanced Server) with the latest Windows service pack and critical updates available from the Microsoft Security Web site.
  • Microsoft Windows XP (Home or Professional)
  • Microsoft Windows Server 2003 family

Recommended software

Depending on your application requirements, you might also need to install one or more of the following:

Note   If the recommended software requirements are not met, Setup will not block installation or warn you of their absence.

Recommended server software

Depending on your application requirements, you might also need the following server software:

  • MDAC 2.7 for data on the server, available from Data Access Downloads on MSDN.
  • Internet Information Services (IIS) on the server for Windows 2000, Windows XP (Professional), and Windows Server 2003. This is required for using ASP.NET applications.

Hardware Requirements

Minimum hardware requirements

Scenario CPU Required RAM Required
Client Pentium 90 MHz* 32 MB**
Server Pentium 133 MHz* 128 MB**

* Or the minimum CPU required to run the operating system, whichever is higher.

** Or the minimum RAM required to run the operating system, whichever is higher.

Recommended hardware requirements

Scenario CPU Recommended RAM Recommended
Client Pentium 90 MHz or faster 96 MB or higher
Server Pentium 133 MHz or faster 256 MB or higher