<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx</link><description>Describes the contents of a patch, as well as any other Windows Installer file type.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#459573</link><pubDate>Fri, 02 Sep 2005 05:12:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:459573</guid><dc:creator>Nick Parker</dc:creator><description>Interesting, what client can you use to run a SQL expression against it?</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#459587</link><pubDate>Fri, 02 Sep 2005 05:26:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:459587</guid><dc:creator>Heath Stewart</dc:creator><description>The SQL - rather, SQL-like expressions - can be executed using the Windows Installer functions and automation interfaces, like Database.OpenView documented at &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/library/en-us/msi/setup/database_openview.asp"&gt;http://msdn.microsoft.com/library/en-us/msi/setup/database_openview.asp&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Many of the script under Samples\SysMgmt\Msi\Scripts in your Platform SDK installation directory like WiStream.vbs and WiSubStg.vbs will enumerate the _Streams and _Storages tables, respectively. They don't currently work for patches though, and I'll blog why later.</description></item><item><title>Updated Sample MSI Scripts</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#460312</link><pubDate>Sat, 03 Sep 2005 02:41:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:460312</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>Changes the sample MSI scripts WiStream.vbs and WiSubStg.vbs to support patch files (.msp files).</description></item><item><title>How Patching Works</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#464048</link><pubDate>Mon, 12 Sep 2005 19:36:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:464048</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>What patches do when being installed or uninstalled.</description></item><item><title>Extract Files from Patches</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#532201</link><pubDate>Wed, 15 Feb 2006 03:47:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:532201</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How to extract files from a patch by patching an administrative installation and the hard way using OLE structured storage APIs.</description></item><item><title>Determine Which Files are Being Patched</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#536252</link><pubDate>Tue, 21 Feb 2006 22:04:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:536252</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How to determine which files are being patched with a custom action.</description></item><item><title>Identifying Windows Installer File Types</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#539962</link><pubDate>Mon, 27 Feb 2006 19:58:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:539962</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How to identify different Windows Installer file types without relying on the file extension.</description></item><item><title>Patch Files Extractor</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#571140</link><pubDate>Sat, 08 Apr 2006 00:43:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:571140</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>Download the source and a release binary for a tool to extract transforms and binary streams like cabinets from Windows Installer files, such as patches.</description></item><item><title>File Sequencing and How Files are Located</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#602135</link><pubDate>Fri, 19 May 2006 23:48:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:602135</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How file sequences identify the file source for installation, and how patches resolve source for new files.</description></item><item><title>Cumulative Service Packs with MinorUpdateTargetRTM</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#631425</link><pubDate>Thu, 15 Jun 2006 00:32:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:631425</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How to create cumulative service packs easily to apply with Windows Installer 3.1 and newer.</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#669350</link><pubDate>Tue, 18 Jul 2006 09:45:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:669350</guid><dc:creator>Gaurav</dc:creator><description>I want to extract a table from the MSP file and save it to a database, is this possible using C#</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#670112</link><pubDate>Tue, 18 Jul 2006 23:33:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:670112</guid><dc:creator>Heath Stewart</dc:creator><description>Gaurav, except the only two common tables - and currently the only two tables that mean anything to Windows Installer - are the MsiPatchMetadata and MsiPatchSequence tables. If you want to get the transforms to a table that the transforms within the patch make, you need to extract the right transform (search my blog for &amp;quot;extractor&amp;quot;) and apply that to an open database handle to the target MSI.&lt;br&gt;&lt;br&gt;Can C# do this? Of course, but you'll need to P/Invoke the MSI APIs.</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#670688</link><pubDate>Wed, 19 Jul 2006 10:00:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:670688</guid><dc:creator>Gaurav</dc:creator><description>Thanks Heath,&lt;br&gt;Let me put my issue more explicitly. I have an application wherein the user would upload his msi file along with some xml files (these would just contain some information regarding the dependencies etc). Now i have to extract these xml's from the msi and save it to the database, all using C#.&lt;br&gt;&lt;br&gt;I am not sure how to approach this problem. Please enlighten.&lt;br&gt;I would appreciate if you can give me an exhaustive picture (i am new to msi's and C#).&lt;br&gt;&lt;br&gt;THANKS IN ADVANCE.&lt;br&gt;Gaurav</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#671584</link><pubDate>Wed, 19 Jul 2006 19:57:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:671584</guid><dc:creator>Heath Stewart</dc:creator><description>Gaurav, comments in a blog are hardly the way to go into detail. I do wonder why you're using MSIs in this way. Are they used to install anything, or just as packaging? If you just need packaging, then use a ZIP file or some other archive format. .NET 2.0 even has supported for ZIP (well, LZ compressed streams - not ZIP file systems but that's not hard to build from what's provided).&lt;br&gt;&lt;br&gt;If you just want to get the files out, again, see my patch file extractor at &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/heaths/archive/2006/04/07/571138.aspx"&gt;http://blogs.msdn.com/heaths/archive/2006/04/07/571138.aspx&lt;/a&gt;. You could do much the same thing in C#, but you will have to P/Invoke the MSI APIs like MsiOpenDatabase, MsiDatabaseOpenView, MsiViewExecute, MsiViewFetch, and MsiRecordReadStream. In my msix.exe tool sample, look how I extract the CABs.&lt;br&gt;&lt;br&gt;Once you get the CAB, you'll need something to expand them and I'm not aware of any libraries that do this currently, but you can use Process.Start to shell-out to some Platform SDK tool like cabarc.exe.&lt;br&gt;&lt;br&gt;If you're going to shell out, though, just use Process.Start to call the following individually:&lt;br&gt;&lt;br&gt;msiexec.exe /a &amp;lt;MSI file path&amp;gt; TARGETDIR=&amp;quot;&amp;lt;target DIR&amp;gt;&amp;quot;&lt;br&gt;&lt;br&gt;msiexec.exe /a &amp;quot;&amp;lt;target DIR&amp;gt;\&amp;lt;MSI file name&amp;gt;&amp;quot; /p &amp;quot;&amp;lt;patch path&amp;gt;&amp;quot;&lt;br&gt;&lt;br&gt;Then you can get the files out of your patch.</description></item><item><title>Been Busy on Visual Studio 2005 Service Pack 1</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#699913</link><pubDate>Mon, 14 Aug 2006 21:26:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:699913</guid><dc:creator>Heath Stewart's Blog</dc:creator><description> I've been away for a while, though I've barely left the Microsoft campus. As we prepare for Visual Studio...</description></item><item><title>P/Invoke</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#712854</link><pubDate>Tue, 22 Aug 2006 19:47:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:712854</guid><dc:creator>Christopher Painter</dc:creator><description>Heath- &lt;br&gt;&lt;br&gt;I've been converting some VBScript files to C# going from the session object to P/Invoke. &lt;br&gt;&lt;br&gt;I have a script that walks an ArrayList and perfoms and update apx 1500 times on an MSI table using a function similar to WiRunSQL. &amp;nbsp;What took seconds now takes 6 minutes. &amp;nbsp;I split the function into 3 functions; &lt;br&gt;&lt;br&gt;init ( MsiOpenDatabase ) &lt;br&gt;exec ( create view, execute view, commit, closehandle view ) &lt;br&gt;final ( close database handle &lt;br&gt;&lt;br&gt;And now it takes 3 minutes to run. &amp;nbsp;Is P/Invoke really that slow or am I doing something wrong? &amp;nbsp;The only thing I can think to do next is pass the arraylist to a COM via interop and perform the updates there outside of the CLR.</description></item><item><title>re: What's in a Patch</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#712855</link><pubDate>Tue, 22 Aug 2006 19:47:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:712855</guid><dc:creator>Christopher Painter</dc:creator><description>The real cost seeme to be associated with the MsiDatabaseCommit call. &amp;nbsp;Moving this to the finalization method really sped things up.</description></item><item><title>Size does Matter</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#715560</link><pubDate>Thu, 24 Aug 2006 02:22:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:715560</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>In response to a previous post where I mentioned that work was being done on Visual Studio 2005 SP1,...</description></item><item><title>Size does Matter</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#792632</link><pubDate>Thu, 05 Oct 2006 04:09:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:792632</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>In response to a previous post where I mentioned that work was being done on Visual Studio 2005 SP1,</description></item><item><title>Been Busy on Visual Studio 2005 Service Pack 1</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#792635</link><pubDate>Thu, 05 Oct 2006 04:09:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:792635</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>I've been away for a while, though I've barely left the Microsoft campus. As we prepare for Visual Studio</description></item><item><title>Viewing Patches in Orca</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#1025861</link><pubDate>Wed, 08 Nov 2006 03:11:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1025861</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>&lt;p&gt;I am often asked why file changes don't appear in the handy Windows Installer tool, Orca. When people&lt;/p&gt;
</description></item><item><title>The Visual Studio 2005 Service Pack 1 Installation Experience</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#1379232</link><pubDate>Fri, 29 Dec 2006 13:23:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1379232</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>&lt;p&gt;Visual Studio 2005 Service Pack 1 can take a long time to install and may apply to multiple products&lt;/p&gt;
</description></item><item><title>Column Types Cannot be Changed in a Patch or Transform</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#4690251</link><pubDate>Sat, 01 Sep 2007 20:19:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4690251</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>&lt;p&gt;Transforms can change just about anything in an installation package - even the code page. Transforms&lt;/p&gt;
</description></item><item><title>Column Types Cannot be Changed in a Patch or Transform</title><link>http://blogs.msdn.com/heaths/archive/2005/09/01/what-s-in-a-patch.aspx#4700420</link><pubDate>Sun, 02 Sep 2007 09:43:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4700420</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Transforms can change just about anything in an installation package - even the code page. Transforms&lt;/p&gt;
</description></item></channel></rss>