How to: Create the Windows Installer Package for 32-bit Client Computers
Applies To: Windows Server 2012 Essentials, Windows Home Server 2011, Windows Storage Server 2008 R2 Essentials, Windows Small Business Server 2011 Essentials
Note
Before you start the procedure in this section, you must complete the procedures listed in How to: Install the Windows Installer XML (WiX) Tools and How to: Create the Windows Installer Package for the Server.
After you download and install the tools, you can use them to create the Windows Installer package (.msi) files. An add-in can contain code that is installed on the server, on client computers, or on both the server and client computers.
The Deployment sample that is provided with the SDK is configured to install a new top-level tab, install an XML file that extends the home page on the server, and install the XML files that are used to extend the Launchpad on both a 32-bit client computer and a 64-bit client computer. Because of the configuration settings that are required, separate Windows Installer packages must be created if you are extending the Launchpad for both 32-bit and 64-bit client computers. For more information about extending the Launchpad, see Creating a Launchpad Add-In
The following procedure shows you how to create a Windows Installer package that is used to install the code from the sample that runs on a 32-bit client computer.
Note
The example for the server shows the installation of multiple files. This example shows the installation of one file on the client computer, but the add-in could install multiple files on the client computer. In the sample, the same source file is used for 32-bit and 64-bit client computers, but separate .msi files are needed because of configuration settings that are specific to the processor architecture.
To create the Windows Installer package
Open Notepad.
Add the following XML code:
<?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='https://schemas.microsoft.com/wix/2006/wi'> <Product Name='Sample 32-bit Launchpad Add-in Deployment' Id='d21da776-86C7-4D14-AEC0-86D16A69ABDE' UpgradeCode='d21da776-7349-453F-94F6-BCD5110BA4FD' Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Your Company Name'> <Package Id='*' Keywords='Installer' Description="Sample 32-bit Launchpad Deployment" Comments='Sample 32-bit Launchpad Deployment' Manufacturer='Your Company Name' InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' /> <Media Id='1' Cabinet='WSSSampleAddins.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" /> <Property Id='DiskPrompt' Value="32-bit Launchpad Installation [1]" /> <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id="WindowsServerDir" Name="Windows Server"> <Directory Id="WindowsServerBinDir" Name="Bin"> <Directory Id="WindowsServerLaunchPadDir" Name="Launchpad"> <Component Id='LaunchPadComponent' Guid='d21da776-83F1-4F22-985B-FDB3C8ABE491'> <File Id='WSSLaunchpadSampleXML' Name='WSSLaunchpad.launchpad' DiskId='1' Source='binaries\WSSLaunchpad.launchpad' KeyPath='yes'> </File> </Component> </Directory> </Directory> </Directory> </Directory> </Directory> <Feature Id='Complete' Level='1'> <ComponentRef Id='LaunchPadComponent' /> </Feature> </Product> </Wix>
Note
- Each Id attribute and Guid attribute for the components must be unique.
- The Name attribute of the File element is the name of the file that is copied to the specified folder on the target computer.
- The Source attribute of the File element is the relative path to the file.
- The difference between installing files on a 32-bit client computer and a 64-bit client computer is the settings are not needed for the processor architecture, and the Id attributes of the parent folders are not the same. For 32-bit client computers, the Id attribute is ProgramFilesFolder; for 64-bit client computers, the Id attribute is ProgramFiles64Folder.
Save the file as SampleWSSClientDeployment32.wxs. When developing .msi files other than the sample, you can provide any name, but the file must have a .wxs extension.
Create the .wixobj file from the file that you created in the previous step by using the Candle tool from the WiX toolset. Open a command-prompt window and type the following command followed by Enter:
candle.exe SampleWSSClientDeployment32.wxs
Create the .msi file from the .wixobj file by running the Light tool from the WiX toolset. In the command-prompt window, type the following command followed by Enter:
light.exe -ext WixUIExtension SampleWSSClientDeployment32.wixobj
To test the Windows Installer package, you can run it by double clicking the .msi file, verify that the files were copied to the appropriate places, and then you can remove the package. The package can be removed by uninstalling it from the Control Panel.
Note
To create an .msi file for a 64-bit client computer, see How to: Create the Windows Installer Package for 64-bit Client Computers.