Automating Windows Feature Installation

We did some battling today with the package manager pkgmgr in Windows Vista and won.

The plot

We needed a way to install MSMQ and IIS7 via a script so we could automate yet another phase of the DinnerNow.NET installation.

Act 1

Brett Hill points us in the right direction to get IIS7 installed via the package manager. Nice one Brett.

So we figure (we that is Johnny Halife and I) that MSMQ should be similar.

Act 2

Not the easiest thing to find a list of packages that can be installed by the package manager. EventuallĀ I discovered the Windows Automated Installer Kit, which contains a list of packages, and more importantly what the command line names are.

The Twist

According to the help file in the kit, it claims that MSMQ-Server is the package name. This is correct and also not correct. Further investigation reveals the sub-component Server Core, also has the same name. Something is wrong.

Peril

The update to DinnerNow.NET needs to ship today and we're not up for an all nighter. we try almost every possible combination os MSMQ, MSMQ-Server, MSMQ-Server-Core and no luck

Our Hero

I'd love to say we did something incredible, some massive engineering feet where we warped the space time continum.

No we er, well sent an email to the internal discussion list for MSMQ. Genius

Our Hero replied with the answer.

Final Act

We created the new install script for MSMQ, built the MSI, ran through our tests and everything rocked. (we have many more tests since our Wednesday drop)

The End

oh one more thing

 pkgmgr /iu:MSMQ-Container;MSMQ-Server