
Bootstrapping for ClickOnce Applications
Missing prerequisites must be installed using separate redistributable packages. The deployment tools in Visual Studio let you install the .NET Framework and other redistributables as a part of your installation—a practice known as bootstrapping.
Visual Studio includes the following deployable packages:
.NET Framework version 2.0
Microsoft Data Access Components (MDAC) 2.8
Microsoft Visual J# .NET Framework Redistributable Package 3.1
SQL Server 2005 Express Edition
Windows Installer 2.0
By default, bootstrapping is enabled for both Windows Installer deployment and deployment with ClickOnce. You can disable bootstrapping for a component, but you should only do so if you are sure that the correct version of the component is already installed on all target computers.
When you deploy a ClickOnce application by using Visual Studio, the development environment will prompt you if you want to include certain redistributables, such as the .NET Framework, as dependencies. If you select one or more of these options, Visual Studio will generate a Windows executable program named Setup.exe (the "bootstrapper") that is responsible for installing these dependencies before your application runs. This bootstrapper runs as a separate process that is independent of the ClickOnce run-time engine.
With ClickOnce deployment, the Publish.htm page generated by the ClickOnce Publish Wizard points either to a link that installs only the application or to a link that installs both the application and the bootstrapped components.
If you do not use Visual Studio, but compile your applications on the command line, you can create the ClickOnce bootstrapping application by using a Microsoft Build Engine (MSBuild) task. This is the same build task that Visual Studio uses to generate the bootstrapping application. For more information, see GenerateBootstrapper Task. For more information about how to use MSBuild to compile projects, see MSBuild Overview.
During installation, users on certain Windows operating systems may be prompted for administrative permissions to run the redistributables, even if they are already installed.
As an alternative to bootstrapping, you can pre-deploy components using an electronic software distribution system, such as Microsoft Systems Management Server (SMS).
Bootstrapping Application (Setup.exe) Command Line Arguments
The Setup.exe generated by Visual Studio and the MSBuild tasks supports the following small set of command-line arguments. Any arguments supplied to the bootstrapping application beyond these are forwarded to the application installer.
- -?, -h, -help
Displays a Help dialog box.
- -url, -componentsurl
Shows the stored URL and -componentsurl for this set up.
- -url=location
Sets the URL where Setup.exe will look for the ClickOnce application.
- -componentsurl=location
Sets the URL where Setup.exe will look for the dependencies, such as the .NET Framework.
- -homesite=true|false
When true, downloads the dependencies from the preferred location on the vendor's site. This overrides the -componentsurl setting. When false, downloads the dependencies from the URL specified by -componentsurl.