Click here to Skip to main content
Click here to Skip to main content

Editing MSI Deployment Packages with Orca and Adding Custom Shortcuts

, 5 Apr 2005
Rate this:
Please Sign up or sign in to vote.
Tutorial on Basic MSI Architecture, how to edit VS.NET Setups with Orca, and adding custom shortcuts.

Introduction

This article is in the form of a compiled HTML help file. It describes some of the basic architecture of the MSI package created using the Visual Studio .NET Setup Project.

We'll look at how elements defined in the NET IDE are translated into an actual MSI setup. And we'll perform a simple exercise in customization of the MSI using the MSI editor tool Orca.

Developers occasionally ask how to create an Uninstall shortcut in their application setups. We'll use this customization as our example.

Having said that, let me state something for the record:

I am already well aware that this is contrary to Microsoft Logo Certification which states that applications should only be removed from the Control Panel. But consider the following:

Most developers never get their setups Logo Certified. In fact, most installs for Microsoft products themselves do not come even close to Logo Certifiable. (For that matter, Microsoft changes their "Best Practices Guidelines" like women change their shoes).

And as far as creating uninstall menu entries being against recommended best practices, as preached by Microsoft, look at what Microsoft practices: I just downloaded (on 04/05/2005) the latest MS SDK Platform Update. It creates an uninstall entry on the program menu! I also downloaded the Microsoft AntiSpyware Package. It creates an uninstall entry on the program menu. The MSDE setup? It creates an uninstall entry on the program menu. That's just for starters.

Uninstall menu entries are more user friendly than having to go to the Control Panel. They are nice to have particularly if you are creating a package, for example, that allows a 30 day trial.

If people want to add an uninstall entry, obviously Microsoft does not see anything wrong with it, and I see nothing wrong with it either.

And even if you are a die-hard adherent to MS Best Practices, you can use the same techniques to create other useful custom shortcuts. For example, an application that uses MSDE or SQL Server might want to include it's own menu entry to launch the Service Manager. This is a lot more user friendly than having to explain to a user that, they have to navigate to a different menu entry in case they need to manually start the SQL Server for some reason.

More importantly, we'll also take the first steps towards learning some basics about how Windows Installer packages are put together, and how to edit them etc. etc.

Since this is not a conventional programming tutorial, there is no source code. Just download the zip and open the help file. There are very detailed steps, descriptions, and images throughout. You'll need to have any version of VS.NET installed. If you use Visual Studio 6 with the VSI add-in that creates MSI's instead of using the Package and Deployment Wizard that will work just fine too, but you may have to add a few steps - look at the article on creating menu entries with VSI add-in on my website (the link is in the download).

You'll find links to the Orca and other SDK tools, you'll need in the help file.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

rwestgraham
Web Developer
United States United States
I've worked in the chemical industry, nuclear power industry, and now healthcare (in that order).
 
My specialized area of IT interest is installer technologies.

Comments and Discussions

 
GeneralModifiyng uninstall file Pinmemberjosip cagalj28-Apr-09 3:37 
GeneralThank you!! Pinmemberpointer4-Sep-08 4:56 
GeneralUnable to read .chm Pinmembersamnino10-Dec-07 13:25 
QuestionUnicode PinmemberMHASSANF18-Dec-06 22:09 
QuestionControl Panel Shorcut Pinmembernaga_01_raj14-Feb-06 22:02 
AnswerRe: Control Panel Shorcut Pinmemberrwestgraham2-Mar-06 11:43 
GeneralGood Article PinmemberJaved Akhter Siddiqui9-Feb-06 1:04 
GeneralRe: Good Article Pinmemberrwestgraham2-Mar-06 11:30 
QuestionHow to modify the uninstall link in ORCA Pinmemberken12320-Apr-05 9:04 
AnswerRe: How to modify the uninstall link in ORCA Pinmember_alank8-Apr-06 5:03 
AnswerRe: How to modify the uninstall link in ORCA PinmemberCraig Steddy14-Apr-09 2:08 
GeneralMSI PinmemberDavid Nulty19-Apr-05 6:53 
GeneralRe: MSI Pinmemberrwestgraham19-May-05 21:39 
GeneralCAB File PinmemberAdalberto Rua Aguirre14-Apr-05 6:29 
GeneralRe: CAB File Pinmemberrwestgraham19-May-05 21:21 
GeneralSome notes PinmemberAndromeda Shun13-Apr-05 23:53 
Hi!
 
While reading your article some remarks came to my mind, so here they are:
 
In Phase 3 'The Application File' you say "Each file is assigned a unique key derived from a GUID". In your setup, the component is identified with the same GUID with "C_" added as prefix. This is true for MSI packages created with Visual Studio, but it's not true generally. Files can be "named" with normal names, so your File entry could have been "HelloWorldExecutable" instead of a GUID. Components also can have normal names like "HelloWorldExecutableComponent", they are even referenced with this name, so in my example the Component entry in the File table would be "HelloWorldExecutableComponent". However, GUIDs are needed to identify components system-wide. So each component has a GUID associated in its ComponentId column of the Component table.
 
This remark applies to nearly all tables of the MSI package. Visual Studio often creates GUIDs as names, since they are always unique. However, you can often use normal names.
 
Further down under 'The Run Hello World Shortcut' you say "The Target field makes no sense". This might be true when the MSI package is created by Visual Studio, and it's definitely true in your example, but generally it's not true. In an MSI package I created the Target field contains the path to the exe file '[INSTALLDIR]MyProgram.exe'.
 
In Phase 4 'Adding the Shortcut Entry' you say "I hope you wrote down the setup's ProductCode GUID at the beginning! (Don't say I did not tell you so!)". I don't remember reading this, the ProductCode was never mentioned. Perhaps I missed it, but perhaps you forgot it... Since searching in CHTML is not supported you have better ways of finding this out.
 
Your article is great, it gives a smooth introduction into the most important parts of the MSI database.
 
CU, Andromeda Shun Cool | :cool:
GeneralRe: Some notes Pinmemberrwestgraham19-May-05 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411022.1 | Last Updated 6 Apr 2005
Article Copyright 2005 by rwestgraham
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid