Extract an msi before installing it. (like the ASP.NET MVC RC msi)

If you are like me, then you probably have quite a few projects going that are using the ASP.NET MVC Framework.  The team has been very good about giving us frequent releases over the past year.  Because of this, my company has been able to plan for this release in ongoing projects.  Because of this also, I, and my employees have projects that depend on the beta release of the ASP.NET MVC Framework.  When the RC is released in January, we will plan the migration, but since the MVC Framework comes in an MSI file, we prefer to consume the binaries in raw form to undergo migration testing rather than make the big jump by uninstalling the previous release and installing from the MSI. 

Because of our build system, it is easy for us to just plop the new assemblies into the "lib" folder and run the local build.  To go further, we can easily run our regression test suite as well, which includes WatiN tests running the system through its paces with over 1700 asserts.

In order to get at the binaries, I want to extract the MSI instead of installing it the first time around.  The following command will extract the MSI so I can get at the contents:

msiexec /a AspNetMVCRC-setup.msi
 
This command took a few seconds to complete, but when it completed, I clicked a "Finish" button, and then I was able to find the extracted files in the following path.
 
C:\PFiles\Microsoft ASP.NET

By using this technique, I was able to check out the Release Candidate (internal MS build) without affecting my local GAC or Visual Studio templates.


Trackbacks

ASP.NET MVC Archived Blog Posts, Page 1 Posted on 12.29.2008 at 12:00 AM

Pingback from ASP.NET MVC Archived Blog Posts, Page 1

Reflective Perspective - Chris Alcock » The Morning Brew #252 Posted on 12.29.2008 at 5:33 AM

Pingback from Reflective Perspective - Chris Alcock » The Morning Brew #252

Interesting Finds: 2008.12.31 Posted on 12.30.2008 at 7:06 PM

Happy new year, 2009 .NET Learning PureMVC the Hard Way (is there any other way?) Browsing message queues

Comments

Jack said on 12.27.2008 at 12:58 AM

Why not just download the source and compile it?

Jeffrey Palermo said on 12.27.2008 at 1:12 AM

@Jack,

Because that would take longer. :-)

GS said on 12.27.2008 at 10:31 AM

Is /a switch for msiexec is universal switch to unpack msi files?

Christopher Painter said on 12.29.2008 at 11:39 PM

/a is to perform an administrative install. Typically I run a command like:

msiexec /a AspNetMVCRC-setup.msi TARGETDIR=C:\EXTRACT /QN

This will do a silent administrative install to C:\EXTRACT. Note that this type of extraction is really only useful for xcopy type packages. If there had been COM/Registry ectera in the package you'd probably have a hard time consuming the bits in a build environment.

gerry lowry said on 1.03.2009 at 6:19 PM

far too many typos/grammar errors for such a short blog:

"If you are like me, then you probably have quite a few project" should be

"If you are like me, then you probably have quite a few projects" plural.

"When the RC is release in January" should be

"When the RC is released in January".

"we prefer to consume the binaries in raw for" presumably should be

"we prefer to consume the binaries in raw form".

"then I was able to find the extracted files in the following patch.

" should be

"then I was able to find the extracted files in the following path.

" (patch "patch" to get "path").

"By using this technique, I was able to check out the Release Candidate" should be

"By using this technique, I will be able to check out the Release Candidate" unless you have access to time travel since (a) your blog entry is dated 2008-12-26, (b) you wrote about a January release date for the first RC, and (c) it's January 3rd and there is no RC at www.codeplex.com/.../View.aspx or http://www.asp.net/mvc/ .

THEREFORE, I'd have great difficulty trusting your code since executable software is far less forgiving than we readers of your text.

Regards,

Gerry (Lowry)

gerry lowry said on 1.03.2009 at 6:29 PM

Now that I've got the issues of typos, grammar, and time travel out of the way in my previous comment, I think you're taking a huge risk with your technique suggested by this blog.

Specifically, you're probably better off uninstalling your beta ASP.NET MVC and then installing the first RC when it becomes available. My experience with the CTPs and the "official" Beta that was finally released last October 16th is that you can anticipate template changes too. In fact, template changes will definitely have to be made to resolve issues with the current templates.

While you may experience short term gain with your suggested technique, do not be surprised if unanticipated pain follows the gain that you expect to get.

Regards,

Gerry (Lowry)

Jeffrey Palermo said on 1.03.2009 at 11:37 PM

@Gerry,

Thanks for those grammar corrections. I have no excuse for those.

I have a private build of the MVC framework that will soon become the RC. As an ASPInsider, I'm one of the folks that tries out and provides early feedback about the framework.

Your concerns about the templates are certainly founded, and the extent of my usage of the binaries was to decide whether I wanted to uninstall the beta. Running my test suite, looking at them in RedGate's Reflector, etc, is why I wanted the binaries before commiting to modify my GAC and the Visual Studio templates.

Thanks for the comments.