- 3 Great Tips for Real-World MSI Packaging
- How to Stop a MSI from Rebooting
- Adding File, Registry, and Shortcut Changes to Your Deployments
- Building an MSI from Scratch with Smart Packager
No matter the application, I’ve always had three issues with MSIs. First,editing the MSI is a pain. Orca makes this a little less painful but the tool is starting to show some age. Second, distributing drivers with the original MSI is nearly impossible! Most of the time, the solution is using a mixture of DEVCON/PNPUTIL or a deployment share. Finally, custom actions (such as activations or follow-up procedures) have to be manually ran or deployed with Group Policy. There isn’t a simple way to embed these into an MSI.
There is one easy free solution to all of these issues. Today, we are going to use Scalable’s Smart Packager to make your MSI maintenance simple.
To follow along with this article, download Smart Packager and grab an MSI to work with. If you don’t have one, 7-Zip always makes a good test subject. Once installed, launch Smart Packager and select the Package Editor Tab. You will be prompted to add an MSI into the Package Editor. Browse to your MSI and add it now.
Now that Smart Packager is installed and ready to edit an MSI, double click on your listed MSI to tackle your first problem!
#1: As a Complete Orca Replacement
If you have worked with MSIs for any length of time, you have probably have used the classic Microsoft tool, Orca. By exposing the MSI as a database, Orca allows for the direct editing of the application. This editing is not simple.
The Package Editor in Smart Packager is the update to Orca that has been needed for years. For example, take a look at the Shortcuts tab. Unlike Orca, Smart Packager clearly shows you where each shortcut is going and uses standard location variables to do so.
Deleting a shortcut is as easy as hitting remove and changing a shortcut’s location is just as simple. You can manually enter a location or select common directories from a drop down menu.
This same simplicity applies to file, registry entries, or services. For me, this feature is awesome! Many of our applications require a separate GPO to copy over a settings file, registry entry, etc. Over the next few weeks, we will cover how you can phase out certain Group Policy Preferences and streamline your deployments.
#2: Distributing Drivers with Applications
I love proving vendors wrong – especially when they tell me that an application can’t be deployed! Most of the time, you are told that the application contains custom drivers and that will stop the deployment. I say they just have lazy developers but that is beside the point.
Adding a driver into an MSI is easy with Smart Packager. In the Package Editor, select the Drivers Tab and then Add. Because your driver files are probably not located in the MSI, you will have to add it as a New Package File.
Being able to add drivers to an MSI with a GUI interface is huge! It can allow you to maintain a single item when deploying mixed software/hardware applications such as USB video cards, imaging devices, etc. This feature also has the potential to reduce logon times in your domain. If you use Group Policy Printer Preferences, you can pre-deploy printer drivers to your machines to speed up printer installations.
#3: Running Custom Actions within the MSI
The final tip that we are going to cover is creating a custom action within your MSI. Often, you will need to follow up an installation with something extra. You might need to activate the application as an administrator or launch a second silent install. Custom Actions let you achieve this without creating complexity.
In the Package Editor, select the Custom Actions tab and then add. You can now add it a separate follow-up executable or VB script.
Regardless of your selection, you can either embed the required file into the MSI or use an existing file. You can also specify additional parameters (such as silent switches and user interaction switches). In my environment, I already know of a handful of applications that I need to reorganize with the custom action tool.
Detailed Walkthroughs and Guides
Over the next few weeks, we are going to follow-up on this article with detailed walk-throughs. We are going to cover how you can simplify your deployments by reducing the deployment types (GP, SCCM, etc). We are going to create an MSI from scratch to directly modify our clients. Finally, we are going to learn how to stop applications from breaking a MDT Task Sequence.
If you have any common deployment issues, leave me comment and we might be able to find a great solution to that as well! If you still haven’t, download Smart Packager and make your application infrastructure a bit more modern.