Microsoft KB Archive/314131

= How To Create Patch Files for the MSDE 2000 Sample.msi File =

Article ID: 314131

Article Last Modified on 10/29/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Desktop Engine (Windows)

-



This article was previously published under Q314131



IN THIS TASK
SUMMARY
 * General Information
 * Steps to Create the Service Pack Patch



SUMMARY
This article describes how to create a patch file for Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) named Sample.msi. Sample.msi is a sample package that is included with the development tools of SQL Server Standard, SQL Server Enterprise, and the SQL Server Developer Editions.

back to the top

General Information
You can use the Sample.msi file to package MSDE 2000 with your application. With the use of the Sample.msi file, you can change the product code and the package code in it so that your setup package does not conflict with other products that are installed on the same computer. For more information, see the &quot;Managing Desktop Engine Installation Package Files&quot; topic in SQL Server 2000 Books Online.

To create patch files for MSDE 2000, you must have a solid understanding of Windows Installer technologies. For more information about Windows Installer technologies, please visit the following Microsoft Web site to view the Windows Installer SDK documentation:

http://msdn.microsoft.com

You must have Windows Installer SDK version 1.5 or 2.0 installed to follow the sample steps that are described in this article. Windows Installer SDK 2.0 is included as part of the Windows Platform SDK. Additionally, make sure that the appropriate path exists for the following files:


 * Orca.exe
 * Guidgen.exe
 * Msimsp.exe
 * Makecab.exe
 * Patchwiz.dll

You must be familiar with the Orca.exe tool to perform basic editing, to change the product code, to change the package code, and to add and to modify rows to database tables inside the .msi file.

For additional information about how to use Orca.exe, click the article number below to view the article in the Microsoft Knowledge Base:

255905 How To Use the Orca Database Editor to Edit Windows Installer Files

back to the top

Steps to Create the Service Pack Patch
These sample steps describe how to create a Service Pack 1 patch for the MSDE 2000 Release to Manufacturer (RTM) Sample.msi.

NOTE: You can substitute Service Pack 1 with Service Pack 2.  Create the folders, and then copy the files:  

 This article uses an example share named \\MachineA\Share1. While following the sample steps, you must use your share folder according to your own computer share setting. Make the folder structure resemble the following structure and make sure that you have full control permissions on all the shares while you create the patch:

\\MachineA\Share1\RTM

\\MachineA\Share1\RTM\AdminImage

\\MachineA\Share1\Sp1

\\MachineA\Share1\Sp1\AdminImage

\\MachineA\Share1\RTM\Patch

NOTE: The folders can be local. Additionally, you can use the Universal Naming Convention (UNC) when you build a patch if the resource is from different computers. Copy the Sample.msi and Sqlrun.cab files from MSDE 2000 RTM to the \\MachineA\Share1\RTM folder. If you previously modified the Sample.msi file (by modifying the product code, the package code, or the name of the Sample.msi), copy the modified Sample.msi file.

NOTE: The Sample.msi file is located in the Devtools\Samples\Desktop directory, and the Sqlrun.cab file is located in the MSDE\Setup directory. Copy the Sqlrun01.msi and Sqlrun.cab files from MSDE 2000 Service Pack 1 to the \\MachineA\Share1\Sp1 folder.

NOTE: Sqlrun01.msi and SP1 merge modules or Sqlrun01.msi and SP2 merge modules were released to MSDN Universal subscribers.  Change or verify the package code and the product code in the Sqlrun01.msi file.  

NOTE: When you generate a globally unique identifier (GUID), make sure to convert it to all uppercase. This applies to all GUIDs that are mentioned in this article. All Windows Installer SDK documents that letters in product code and package code GUIDs must be uppercase. Because the Guidgen.exe utility generates GUIDs that contain lowercase letters, you must change the lowercase letters in these GUIDs to uppercase before you use them as product code or package code.

</li> Change the product code in the Property table of Sqlrun01.msi to match the product code from your Sample.msi file.</li> Use the Guidgen.exe tool to generate a new GUID. Make sure the new GUID is in uppercase. From the summary information of Sqlrun01.msi, change the package code to the new GUID by using the Orca.exe tool or the Msiinfo.exe tool.</li></ol> </li> Create Windows Installer administrative images:  

</li>  Create an administrative image for the Sample.msi file by using a command that is similar to the following: msiexec.exe /a \\MachineA\Share1\RTM\Sample.msi TARGETDIR=\\MachineA\Share1\RTM\AdminImage /L*v \\MachineA\Share1\RTM\AdminImage\Admin.log </li>  Create an administrative image for the Sqlrun01.msi file by using a command that is similar to the following: msiexec.exe /a \\MachineA\Share1\sp1\Sqlrun01.msi TARGETDIR=\\MachineA\Share1\Sp1\AdminImage /L*v \\MachineA\Share1\Sp1\AdminImage\Admin.log </li> Use the Orca.exe tool or the Msiinfo.exe tool and make sure that the two .msi files from the preceding two AdminImage folders are not compressed.</li></ol> </li> Make the patch creation properties file:  

</li> Copy the Template.pcp file from Windows Installer SDK to \\MachineA\Share1\Patch, and then use the Orca.exe tool to perform the following changes in the tables or the summary information respectively:  <li>Add a row in the ImageFamilies table that has the following values: </li> <li>Add a row in the UpgradedImages table that has the following values:

</li> <li>Add a row in the TargetImages table that has the following values:

</li> <li>Change the rows in the Properties table to the following values: </li> <li>Change the package code of the Template.pcp file to a new GUID that is generated by Guidgen.exe. Make sure the GUID is in uppercase letters.</li> <li>Rename the Template.pcp file to Msde.pcp.</li></ol> </li> <li> Make the patch file by using the Msimsp.exe tool. You can use a command that is similar to the following sample command:

msimsp.exe -s \\MachineA\Share1\Patch\msde.pcp -p \\MachineA\Share1\Patch\Sample.msp -l \\MachineA\Share1\Patch\log.txt -f \\MachineA\Share1\Patch\tmp Check the Log.txt log file to make sure that no error occurs after the Msimsp.exe tool creates the patch. If the Msimsp.exe tool successfully creates the patch, a file named Sample.msp is in the \\MachineA\Share1\Patch folder. </li> <li> Test the patch file. Apply the patch on a computer that has Sample.msi installed by using the following sample command:

Msiexec.exe /p Sample.msp REINSTALL=ALL REINSTALLMODE=omus /L*v SamplePatch.txt

Check the SamplePatch.txt log file to make sure the patch installation is successful.

NOTE: REINSTALL=ALL means to reinstall only those features that were already previously installed. Additionally, if you set the REINSTALL property, you must set the REINSTALLMODE property to indicate the type of reinstall that you are going to perform.

</li></ol> </li></ol>

back to the top

Additional query words: MSDE Minor upgrade Patch Installer

Keywords: kbproductlink kbhowto kbhowtomaster KB314131

-

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

© Microsoft Corporation. All rights reserved.