Microsoft KB Archive/888473

= How to create a bootstrapping application to install application components from a Web page in Visual Studio 2005 or in Visual Studio .NET =

Article ID: 888473

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Visual Studio 2005 Standard Edition
 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-





INTRODUCTION
You may have an application that you want to break into manageable components for installation. You typically do this when you want to install a component of an application from a Web page. This article describes how to create a bootstrapping application to download application components from a Web page.



MORE INFORMATION
Use the following procedures to create a bootstrapping application to download and to install application components from a Web page.

Install MSIStuff
The Microsoft Platform Software Development Kit (Platform SDK) contains a configuration tool that is named MSIStuff. MSIStuff passes command-line parameters to configure a bootstrapping application with.

After the bootstrapping application is compiled, it does the following:
 * Calls the WinVerifyTrust function to verify the digital signature of the Microsoft Windows Installer (.msi) file. All Windows Installer packages that use Windows Installer version 2.0 or a later version provide a Subject Interface Package (SIP) to enable the packages to be signed.
 * Upgrades the version of Windows Installer on the computer if an upgrade is required.

You must compile the MSIStuff bootstrapping project into an executable file. The Platform SDK does not include a compiled MSIStuff program. To compile the MSIStuff.exe file, follow these steps:  Install the Platform SDK. You can download the Platform SDK from the Microsoft Download Center.

The following file is available for download from the Microsoft Download Center:

Download the Platform SDK package now.

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. After you install the Platform SDK, click Start, point to Programs, and then click Microsoft Platform SDK .

The Windows  Build Environment window opens. Double-click Set Windows  Build Environment (Retail) to open a Platform SDK command prompt. Locate the following folder:

C:\Program Files\Microsoft SDK\Samples\sysmgmt\msi\msistuff

Note This folder is the default location for the MSIStuff files. Run the following command:

NMAKE /f makefile

A new folder is created in the MSIStuff folder. This new folder is named _Retail Close the Platform SDK command prompt.</ol>

Configure your bootstrapping application
The MSIStuff.exe application is located in the subfolder that you created in the &quot;Install MSIStuff&quot; section. Use MSIStuff.exe to configure the bootstrapping application Setup.exe file that you will associate with your Windows Installer package. You must compile the Setup.exe application separately by using the files in the Samples\SysMgmt\Msi\Setup.exe folder. For more information, see the readme file in the Setup.exe folder.

To associate your Setup.exe file with the Windows Installer file, follow these steps: <ol> Make a copy of the Setup.exe file in the folder where MSIStuff.exe is located.</li> Click Start, click Run, type cmd, and then click OK.</li> Locate the folder that contains the MSIStuff.exe file.</li> Use the following switches when you run MSIStuff.exe to configure your bootstrapping application: <ul> The /u switch sets BaseURL, the base URL location of the Setup.exe file.</li> The /d switch sets the name of the Windows Installer file. This is a relative path of the Windows Installer file. This switch is required if the /m switch is not used. Do not use both.</li> The /m switch sets the name of the .msp file. Uses a relative path of the .msp file. This switch is required if the /d switch is not used. Do not use both.</li> The /n switch sets the product name.</li> The /o switch specifies the type of operation to perform. The valid values are INSTALL, MINPATCH, MAJPATCH, and INSTALLUPD.</li> The /v switch sets the earliest Windows Installer version that must be installed on the computer where your application is being installed.</li> The /i switch sets the InstMSI URL address, the location of upgrade executables. If this value is missing, the location of the Setup.exe file is used.</li> The /a switch sets INSTMSIA, the name of the ANSI version of the Windows Installer upgrade executable file. This is a relative path of the ANSI version of the Instmsi.exe file.</li> The /w switch sets INSTMSIW, the name of the Unicode version of the Windows Installer upgrade executable file. This is a relative path of the Unicode version of the Instmsi.exe file.</li> The /p switch sets the property value strings.</li></ul>

The command-line syntax will appear similar to the following.

Note Type this command on one line.

MSIStuff.exe setup.exe /U http://www.example.com/ /D  .MSI /N   /V 200 /a Ansi/Instmsi.exe /w Unicode/Instmsi.exe

</li></ol>

Put your files on the server

 * 1) Put the Setup.exe file and the  .msi file on the Web server that contains the Web page where users will download the application. You may sign the package by using a digital certificate. We recommend that you sign the package, but signing is optional.
 * 2) Put a hyperlink on the Web page where users will download the application.

When a user clicks the link, the user is prompted to save the file or to run it from that location. If the user clicks Run, the Setup program (Setup.exe) upgrades the version of Windows Installer that is installed on the user's computer, if the upgrade is required. The Setup program then installs the package.

For more information about how to configure the MSIStuff application, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/aa369557.aspx

Keywords: kbvs2005swept kbvs2005applies kbhowto KB888473

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.