Recently I decided I wanted my VisioPS PowerShell module to be installed into the users Powershell module folder. This would make it easy to use VisioPS because the module could always be imported from any PowerShell instance without having to change directories, etc.
Naturally I wanted an real MSI installer for it. Unfortunately Visual Studio 2012 No longer supports setup projects and InstallShield does support Visual Studio 2012 yet. So, I decided to create my own using WIX.
I started with the description here: http://sev17.com/2010/11/building-a-powershell-module-installer/ – which is a bit out-of-date and more complex than I needed. I transformed those instructions into a simple powershell script that will build an MSI.
The script is too long to go into detail here, but an excerpt should illustrate its usage.
At the topic of the script are “user inputs”. Simply replace these values as needed and run the script. It will take the contents of a folder ($binpath) and create an MSI for you. If $binpath contains a file called “license.rtf” that file will be shown as the license in the MSI.
Here's an example from the script I use to build the VisioPS installer.
# USER INPUTS TO THE BUILD PROCESS
$productname = "Visio Powershell Module"
$productshortname = "VisioPS"
$productversion = "126.96.36.199"
$manufacturer = "Saveen Reddy"
$helplink = "http://visioautomation.codeplex.com"
$aboutlink = "http://visioAutomation.codeplex.com"
$binpath = "D:\saveenr\code\visioautomation\VisioAutomation_2010\VisioPS\bin\Debug"
$productid = "4A2B528A-93E5-431D-97BB-79767C7677C5"
$upgradecode = "EE659AB6-BE76-426E-B971-35DF3907F9D4"
$upgradeid = "F14DC5AF-1234-498A-9646-AA27E03957AA"
$delete_temp_folder_on_exit = $true;
$output_msi_file = join-path ([Environment]::GetFolderPath("MyDocuments")) ($productshortname + ".msi")
You can find the code here on my SkyDrive: http://sdrv.ms/RnsF0z
Ultimately I hope to use a newer version of InstallShield, but this was a nice learning exercise.