.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


comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube