If you have a setup file (.msi) built with Visual Studio 2008 and you want to create a WiX project to build a Visual Studio 2012 .msi, this article is for you.
Note that this utility is best suited for setup files which are fairly simple and do not have too much customizations involved.
In the below blog, there are steps to extract information from a VS2008 .msi. These manual steps are cumbersome if you have many .msis to be converted. These simple steps are combined into a UI based utility.
Using the code
The UI is self explanatory. The utility does the following:
- Use dark.exe to decompile the .msi to create the .wxs file.
- Use dark.exe to extract and rename the binaries (limited set). More customization might be needed depending on the contents of your .msi.
- Copy a simple Config.wxi which has relative paths set for the files to be packaged
- Copy a sample .wixproj to get started.
- Replace '~' in ShortName attributes to '-' to remove warnings
Anyone who’s using Visual Studio 2012 and either opened up an old solution with a Setup Project (.vdproj) or created a new solution and looked for the setup project under project types will know it’s no longer there and no longer supported. This is not actually that surprising since TFS Build Server and MSBuild doesn’t support the legacy .vdproj files any way.
Wix is the recommended alternative; itis very powerful, but quite complicated to work with and there is currently no GUI.
The .vdproj can’t be converted directly, however one of the wix tools called dark can be used to decompile msi files into wxs xml format.
This is a step by step procedure for converting an MSI with an exe, a number of DLLs and files into a Wix project.
First you know I've got to whine about the dropping of the Setup and Deployment Project types from VS 2012+... whine, whine, whine... Okay, that's out of my system (for now).
Anyway... If you have an MSI that you'd like to WiX'ify, the Dark utility and the two above projects will help.