.NET Tips and Tricks

Blog archive

Working with InstallShield

In the November issue of Visual Studio Magazine, I reviewed a pair of Windows installation and deployment packages--Flexera Software InstallShield and Wise Package Studio. Today I'll dive a little deeper in InstallShield.

InstallShield actually provides you with two interfaces for creating deployment packages. One is integrated with Visual Studio. The other is the standalone InstallShield 2011. This interface allows you to choose between a wide variety of project types. These include a number of Wizards (including one for Visual Basic 6) and a ClickOnce deployment project.

However, when the Wizards aren't enough, you'll need to use one of the InstallScript projects. Typically, you'll use an InstallScript project when you want to take control of the installation user interface or when there are tasks that you need to perform after your software package is installed (and, occasionally, before installing your package). While using InstallScript isn't for the faint of heart, InstallShield does go a long way towards managing the process.

For instance, if you select the most "free-form" of the InstallScript projects, the base InstallScriptProject, InstallShield presents the project to you in the Installation Designer, a treeview that organizes the components of the installation package. It's not a Wizard (there's no attempt to walk you through the steps) but the treeview does structure the tasks you need to perform.

The first step, for instance, is to define the "Features" that make up your deployment package. As you add features, a dialog (available from the Feature's property sheet) allows you to create dependencies between features (i.e. don't install this feature without this other feature). Each feature has a set of events associated with it, listed in its Properties Window, that you can tie InstallScript code to.

Further down in the Installation Designer you can write your InstallScript functions that you can tie to your events. The UI isn't as slick as I might like. There's no way to create the skeleton of a function from the Properties Window of a feature as you can when adding event handlers in Visual Studio, for instance. This necessitates some bouncing back and forth in the TreeView between the script node and the features node. But the InstallScript editor is more than just an implementation of Notepad and includes, for instance, IntelliSense-like support.

As I said, InstallScript isn't for the faint of heart (and C programmers will feel more at home with InstallScript than Visual Basic programmers will), but the InstallShield UI goes a long way to managing the complexity.

Posted by Peter Vogel on 11/18/2010 at 1:16 PM

comments powered by Disqus


  • Top 3 Blazor Extensions for Visual Studio Code

    Some developers prefer to create applications with Microsoft's open-source Blazor tooling from within the open-source, cross-platform Visual Studio Code editor. Here are the top tools in the VS Code Marketplace for those folk, as measured by the number of installations.

  • How to Invert a Machine Learning Matrix Using C#

    VSM Senior Technical Editor Dr. James McCaffrey, of Microsoft Research, explains why inverting a matrix -- one of the more common tasks in data science and machine learning -- is difficult and presents code that you can use as-is, or as a starting point for custom matrix inversion scenarios.

  • Microsoft Engineer: 'It's Time to Move OData to .NET 5'

    Microsoft engineer Sam Xu says "it’s time to move OData to .NET 5" and in a new blog post he shows how to do just that.

  • Microsoft Goes Virtual with Developer Education in Face of COVID-19

    Like many organizations that host developer educational events, Microsoft has gone virtual amid shelter-in-place directives and a surge in remote work stemming from the COVID-19 pandemic.

  • Microsoft Enhances Low-Code Power Apps

    Microsoft's nod to the low-code movement, Power Apps, has been enhanced with a bevy of new features, including mixed reality, canvas/model support in a new mobile app, UX improvements and more.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events