Managing Desktop Engine Installation Package Files
The Microsoft® SQL Server™ 2000 Desktop Engine Setup uses two main files: a .cab file containing the files to be installed, and an installation package (.msi file) that defines the installation process. In addition, if an application setup program uses the Win32® CreateProcess() function to call the Windows Installer program (Msiexec.exe), the setup program must specify an installation package file.
All applications must use a different Desktop Engine installation package file for each instance of the SQL Server Desktop Engine installed on a computer. If one installation package file is used to install one instance, that installation package file cannot be used to subsequently install another instance of the Desktop Engine.
Here are the ways for an application to provide a Desktop Engine installation package file:
- Copy the 16 SqlrunXX.msi files from the \Sqlmsde\Setup folder on the SQL Server 2000 compact disc to the folder containing Setup.exe. There are only 16 .msi files on the compact disc because Microsoft supports a maximum of 16 SQL Server 2000 instances per computer.
- The application setup folder can contain a custom Desktop Engine installation package file.
If an application copies all 16 of the SqlrunXX.msi files into the folder with the Desktop Engine Setup and does not specify a /i parameter, the Desktop Engine Setup dynamically chooses one of the 16 .msi files that has not yet been used to install an instance. This is the recommended approach, and is the easiest to implement.
Each Desktop Engine installation package file contains globally unique identifiers (GUIDs) that uniquely identify the file. GUIDs are incorporated in the installation package file at the time the file is created. The Desktop Engine Setup uses the GUIDs to determine whether a particular installation package file has been already used to install an instance of the Desktop Engine on a computer. This means that if a user gets two different copies of the same installation package file, they can use only one of them to install an instance of the Desktop Engine on a computer. For example, two different vendors could decide to minimize the size on their application's setup folders by using only the Sqlrun04.msi file from the SQL Server 2000 compact disc, and not copying all 16 of the installation package files supplied by SQL Server. Only one of the applications could install an instance of the Desktop Engine successfully. When the second application attempted to install an instance of the Desktop Engine, it would receive an error stating that the sqlrun04.msi had already been used to install an instance of the Desktop Engine. Applications that need to minimize the number of files they distribute with their application can eliminate the potential for such an error by creating a custom Desktop Engine installation package file.
Each time an application needs to uninstall an instance of the Desktop Engine, it must call the SQL Server 2000 Desktop Engine Setup using the /x switch to specify the same .msi file that was used to install that instance.
Creating a Custom Desktop Engine Installation Package File
Creating a custom Desktop Engine installation package file that will never conflict with an installation package distributed by another application requires using Microsoft Visual Studio®, and the Windows Installer Software Developers Kit (Windows Installer SDK). For more information about the Windows Installer SDK, see the MSDN Library at Microsoft Web site. SQL Server 2000 provides the following Desktop Engine installation package files to use as templates when creating a custom installation package file:
- Sample.msi. This installation package file supports only new installs, it does not support upgrading an instance of the Microsoft Data Engine (MSDE) version 1.0 to the SQL Server 2000 Desktop Engine.
- SampleUpg.msi. This installation package file can be used for both installing new instances of the SQL Server 2000 Desktop Engine and upgrading instances of MSDE 1.0 to SQL Server 2000 Desktop Engine.
The default location for both of these files is in the folder C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Desktop.
To generate a custom Desktop Engine installation package file
- Copy the file Sample.msi or SampleUpg.msi to your folder as YourName.msi, where YourName is the name for your custom installation package file.
- Using the GUIDGEN tool from Visual Studio, generate a GUID.
- Using the ORCA tool from the Windows Installer SDK, edit YourName.msi. On the Summary Information menu, replace the current ProductID value with the GUID you generated in GUIDGEN.
- Use GUIDGEN to generate a second GUID.
- In ORCA, edit YourName.msi, go to the Property Table and replace the current ProductCode value with the new GUID. Save YourName.msi.