ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

Sunday, January 13, 2013

IsWiX 2.0.13013.4 Released






IsWiX 2.0.1310.4 has been published on CodePlex.  I've added two new Visual Studio Project Templates that go beyond what WiX proper provides.  These templates along with the WiX designer allows for fast and simple MSI creation using the following simple steps.

1) Create an IsWiX Setup Project and VS Solution.  Example: Notepad
2) Add a new IsWiX Merge Module Project. Name it the same as the project in step 1 except add MM to it.  Example: NotepadMM
3) Add the IsWiX Merge Module Project as a reference to the IsWiX Setup Project.
4) Take a look through the source for any other changes you may need such as CompanyName, EULA, Banner and Dialog Bitmaps.
5) Use IsWiX to author your files into the IsWiX Merge Module Project.
6) Author additional meta into the IsWiX Merge Module Project that's not supported by IsWiX yet.

I've been able to use this process to create a C# Windows Service, create the installer and set up a CI build using Team Foundation Service.  This installer is fully versioned and supports major upgrades. The amount of time needed to author and test is less then 10 minutes!  Here is a short video ( no sound ) to demonstrate.

Thursday, November 8, 2012

Windows 8 Changes Setup Developers Need To Know About

I've been using Windows 8 for awhile and I like it a lot.  I can't say I liked the new Start Screen at first but it's grown on me.  There is room for improvement though.

Anyways, back to installs  Here's a short list I have for the moment and I'll come back and grow it as more things occur to me.

1) The Change UAC Settings dialog doesn't really disable UAC.  You'll find your command windows aren't elevated and that you get UAC confirmation when updating files in the Windows directory.  To completely disable UAC you have to go into the registry and change the EnableLUA policy registry value from 1 to 0 and reboot.  I'm not saying you should do this, I'm just saying that if you *STILL* aren't creating installers that follow best practices with regard to custom action scheduling and execution context  you really, really need to get on board.  (Ahem Visual Studio Deployment Project users ).

2) .NET 2.0/3.0/3.5 is not installed by default.  If you are using managed code such as custom actions that don't have an activation policy manifest that allows the use of newer versions of the framework they will blow up.  (Ahem Visual Studio Installer Class Custom actions users)

3) Installing .NET 2.0/3.0/3.5 on Windows 8 is a pain in the back side.   You can't use the EXE redist, you have to use a dism command to enable the feature.  However,  Microsoft didn't include the bits in the install.wim so it has to be able to go out to Windows Update and download source. In other words it's  web/wsus enabled (via the OS) install only.   There is no standalone installer (MSU) that I'm aware of.    This is a sore spot and is best cured by moving your code forward to .NET 4.0 or beyond.

4) The new start screen shows all icons by default.  The user can create groups (think groupbox )  but they can not create subfolders and zoom into to see the icons.  In other words,  if your installer creates a bunch of icons and you thought that was ok because you were putting them into subfolders to hide them, they will all appear and the user will have to unpin a bunch of shortcuts to clean up his desktop.  (InstallShield, Visual Studio...  lots of icons )   To prevent your installer from doing this, set the System.AppUserModel.StartPinOption to 1 using the MsiShortCutProperty table.


Those are my three biggies so far.  As I discover more, I'll keep you posted.

Saturday, November 3, 2012

Help Wanted - Austin, TX or Atlanta, GA












Tuesday, September 11, 2012

Visual Studio Deployment Projects Migration Assistance Available

With Visual Studio 2012 shipped, the news from a year and a half ago that Visual Studio Deployment Projects would no long be supported is finally hitting home with developers.

They generally aren't happy.

FWIW, I've converted hundreds of these projects to other project types using tools such as Windows Installer XML and InstallShield.  I have this process down to a science and I'd love to have an opportunity to work with anyone needing assistance in moving forward.  

You'll find that I have tools and methodologies that keep my costs very low while greatly improving the quality of your product's installer.

Thursday, April 19, 2012

Patriotic Opener

Credit: United States Marines / Released

Back when I was in the Corps, I used to travel all over the world performing for audiences.  One of our show formats was the Patriotic Opener.   This was basically where we would march onto a stage and do a stand still performance.   Over the years we performed at some impressive venues for some high up big wigs but none as cool or as high as this recent performance.  You can watch the entire ceremony over at C-SPAN.

Saturday, December 24, 2011

IsWiX 1.5 Released

Release 1.5.11358.1 of Industrial Strength Windows Installer is now available for download over at CodePlex.

This release completes the "Component Rules" radio buttons on the Files and Folders designer.  You can read about it in the release notes at CodePlex.

Monday, November 21, 2011

The Curious Case of the Corrupted Characters

Recently I was shown a machine where the PowerShell cmdlet Get-WmiObject was failing to query the Win32_Product class.  The strange thing was that  WMIC path Win32_Process was working.

I almost wanted to blow this off as yet another example of how Win32_Product is broken but there was a catch: I could fix and break the behavior at will by uninstalling and installing the MSI I was working on.

I started to wonder how this could be.  I could only assume that there was some bad data causing casting problems in PowerShell ( COM interop is a pain ) so I decided to run MSI validation to see if it warned me of anything.

Sure enough, it did.  A big ICE24 error alerted me to a problem in the ProductVersion property.  Well, at least it tried to.  2.0.1600 sure looked like a valid ProductVersion to me.  For the life of me I couldn't get it to stop complaining about that value so I decided to export the Property table to an IDT file.  Sure enough notepad showed me a special character and a Hex editor showed me that there were actually two special characters corrupting my property.

I kept digging and found the root of the problem in the build automation NAnt file.   A text file was being created and loaded into a NAnt property using the loadfile elemnt.   Those two extra characters were coming along for the ride.

Let's see all the ways this could have been caught:

1) NAnt could have trimmed the property automatically.
2) ISCmdBld could have trimmed the property.
3) MSI Validation could have been turned on in the build.
4) MsiPublishProduct could actually enforce the required datatype of the property
5) The MSI WMI provider could trim the property.
6) The Get-WmiObject could trip the property or report a better error.

And of course, this post wouldn't be complete without me mentioning that there is a much better alternative to Win32_Product called the ProductInstallation class as found in WiX DTF's Microsoft.Deployment.WindowsInstaller interop.  It's a very nice encapsulation of the unmanaged MsiEnumProducts function and doesn't have the horrible performance problems that Win32_Product has.