I'm using the ExtractFiles Method to extract files from the Windows 2003 Resource kit msi (rktools.msi). Below is a simple snippet of code used :
InstallPackage MsiPackage = new InstallPackage(txtMsi.Text, DatabaseOpenMode.ReadOnly); MsiPackage.WorkingDirectory = "c:\temp"; Regex myReg = new Regex("exe", RegexOptions.IgnoreCase); string[] filekeys = MsiPackage.FindFiles(myReg); MsiPackage.ExtractFiles(filekeys);
Some of the files fail to extract return the following FileNotFoundException :
Could not find file 'c:\temp\Program Files\Windows Resource Kits\Tools\nlsinfo.exe'.
It's strange, because the file exists in the extracted cab file (Cabs.winrk.cab), all the files extract correctly to c:\temp if I use msiexec /a rktools.msi (but this gives me no control over the files I extract). Is this a bug or am I doing something wrong? This problem happens with a number of MSIs including sqlrun.msi of the SQL Server
2005 client tools.
According to Jason Ginchereau itt's a bug in DTF -- ExtractFiles is being case-sensitive where it shouldn't. A few of the files in Cabs.winrk.cab have different casing than their File table keys in rktools.msi. The Windows Installer engine handles that okay but DTF doesn't.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 15 days (the time period specified by
the administrator of this Tracker).