How To Create Patch Files for the MSDE 2000 Sample.msi File
来源:互联网 发布:多益网络战盟 编辑:程序博客网 时间:2024/05/24 23:12
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.
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:
For additional information about how to use Orca.exe, click the article number below to view the article in the Microsoft Knowledge Base:
NOTE: You can substitute Service Pack 1 with Service Pack 2.
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 "Managing Desktop Engine Installation Package Files" 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: (http://msdn.microsoft.com)
- Orca.exe
- Guidgen.exe
- Msimsp.exe
- Makecab.exe
- Patchwiz.dll
For additional information about how to use Orca.exe, click the article number below to view the article in the Microsoft Knowledge Base:
255905
(http://support.microsoft.com/kb/255905/EN-US/ )
How To Use the Orca Database Editor to Edit Windows Installer Files 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.
- 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:
- 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. The letters of all Windows Installer SDK documents 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.- Change the product code in the Property table of Sqlrun01.msi to match the product code from your Sample.msi file.
- 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.
- Create Windows Installer administrative images:
- 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
- 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
- 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.
- Make the patch creation properties file:
- 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:
- Add a row in the ImageFamilies table that has the following values: Collapse this table
Column Value FamilyMSDEAppsMediaSrcPropNameMSDE_SP1_UPDATEMediaDiskId2FileSequenceStart1000 - Add a row in the UpgradedImages table that has the following values: Collapse this table
Column Value UpgradedMSDE_sp1MsiPath\\MachineA\Share1\Sp1\AdminImage\Sqlrun01.msiFamilyMSDEApps - Add a row in the TargetImages table that has the following values: Collapse this table
Column Value TargetMSDE_rtmMsiPath\\MachineA\Share1\RTM\AdminImage\Sample.msiUpgradedMSDE_sp1Order1ProductValidateFlags0x00000922IgnoreMissingSrcFiles0 - Change the rows in the Properties table to the following values: Collapse this table
Column Value PatchOutPutpath\\MachineA\Share1\PatchPatchGUIDUse a new GUID that is generated by Guiden.exe. (Make sure that the GUID is in uppercase.)AllowProducctCodeMismatches0AllowProductVersionMajorMismatches0IncludeWholeFilesOnly1 - 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.
- Rename the Template.pcp file to Msde.pcp.
- Add a row in the ImageFamilies table that has the following values:
- Make the patch file by using the Msimsp.exe tool. You can use a command that is similar to the following sample command: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.
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
- 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 theREINSTALL property, you must set the REINSTALLMODE property to indicate the type of reinstall that you are going to perform.Collapse this tableREINSTALLMODE DESCRIPTION oReinstall if the file is missing, or if an earlier version is present.mRewrite all required registry entries from the Registry table that go to the KEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry hive. Rewrite all information from theClass table, Verb table, PublishComponent table,ProgID table, MIME table, Icon table,Extension table, and AppID table regardless of machine or user assignment. Reinstall all qualified components.uRewrite all required registry entries from the Registry table that go to the HKEY_CURRENT_USER or HKEY_USERS registry hive.sReinstall all shortcuts and re-cache all icons that overwrite any existing shortcuts and icons.
- How To Create Patch Files for the MSDE 2000 Sample.msi File
- How to use Wise SetupCapture in the Wise Packager for Deployment Server to create an MSI
- How to add or replace files within MSI file.
- How to create a custom directory for app files inside the ~/Library/Application Support directory.
- How to Create Dump File for Applications
- How to create EPS files...
- How to use ArcGIS samples for help running the sample
- How to patch the linux kernel patch
- How to get the identity hash codes for files
- How to create patch file in Linu…
- How to create PFX file
- How to create .lib file when you have .dll and .h files onle
- How to create .lib file when you only have .dll and .h files
- How to create an OCM Response file to apply patch in silent mode - opatch silent (Doc ID 966023.1)
- How to re-create STM File in Exchange 2000/2003
- How to make patch for linux
- [zz]How to Create Sample Data in Blend 3
- how to create a sln file
- 工信部要求运营商“到量预警” 遏制天价流量费
- jquery iframe操作
- VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”
- 好久不见7月日语能力考
- Silverlight中Datagrid控件自定义列头样式Demo
- How To Create Patch Files for the MSDE 2000 Sample.msi File
- 六人集会问题
- ios开发中有用的宏定义
- linux-2.6.32在mini2440开发板上移植(16)之LED 驱动程序移植
- vm常见问题
- 远程截图卡死的解决办法
- php操作excel
- JavaScript日常笔记
- android系统中的log定向