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



The information in this article applies to:

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition SP1
  • 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:
  1. 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:
    DownloadDownload 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.
  2. After you install the Platform SDK, click Start, point to Programs, and then click Microsoft Platform SDK month year.

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

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

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

    NMAKE /f makefile

    A new folder is created in the MSIStuff folder. This new folder is named Windows version_Retail
  6. Close the Platform SDK command prompt.

Configure your bootstrapping application

The MSIStuff.exe application is located in the subfolder that you created in the "Install MSIStuff" section. Use MSIStuff.exe to configure the bootstrapping application Setup.exe file that you will associate with your Windows Installer package. When you compile MSIStuff, the Setup.exe file is created in the same folder where you created MSIStuff. The MSIStuff.obj and the MSIStuff.res files are also created in this folder.

To associate your Setup.exe file with the Windows Installer file, follow these steps:
  1. Make a copy of the Setup.exe file in the folder where MSIStuff.exe is located.
  2. Click Start, click Run, type cmd, and then click OK.
  3. Locate the folder that contains the MSIStuff.exe file.
  4. Use the following switches when you run MSIStuff.exe to configure your bootstrapping application:
    • The /u switch sets BaseURL, the base URL location of the Setup.exe file.
    • 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.
    • 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.
    • The /n switch sets the product name.
    • The /o switch specifies the type of operation to perform. The valid values are INSTALL, MINPATCH, MAJPATCH, and INSTALLUPD.
    • The /v switch sets the earliest Windows Installer version that must be installed on the computer where your application is being installed.
    • 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.
    • 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.
    • 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.
    • The /p switch sets the property value strings.

    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/locationofMSIfile /D NameofMSIFile.MSI /N NameOfProduct /V 200 /a Ansi/Instmsi.exe /w Unicode/Instmsi.exe

Put your files on the server

  1. Put the Setup.exe file and the PackageName.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:

Modification Type:MajorLast Reviewed:3/3/2006
Keywords:kbvs2005swept kbvs2005applies kbhowto KB888473 kbAudDeveloper kbAudITPRO