January 2009 - Posts

Chaining MSI Packages with MSI 4.5 White Paper

David Cole, Senior Software Engineer and Install Architect at IBM, has written a white paper called “Using Chained .MSI Packages to Componentize Your Windows Installer Setup”. The white paper is available from Acresso Software, the makers of InstallShield, but most of the content is independent of the tool used to create the setup.

David doesn’t simply reiterate the documentation from Microsoft or Acresso regarding the chaining features that were introduced with Windows Installer 4.5. Instead he collected information about best practices, pitfalls and limitations from sources such as blogs, web sites, community discussions etc. The result is a very useful document that anyone who considers building chained MSI packages should read.

Download the white paper from Acresso (registration required)

WARNING: Anyone who knows your e-mail address can retrieve the information you entered during registration, so be careful what you enter as address, phone number, company revenue, etc.

Buch Inside Windows Installer 4.5 (GERMAN)

Inside Windows Installer 4.5 ist das neue Buch von Andreas Kerl.

(This book is only available in German language, therefore I'm writing this review in German)

Andreas Kerl ist als Autor zum Thema Windows Installer bekannt. Neben einigen Artikeln in Fachzeitschriften hat er auch die Bücher "Inside Windows Installer" (erschienen 2003) und "Windows Installer 3.1" (erschienen 2005) verfasst. Das neue Buch “Inside Windows Installer 4.5” ist aber keine Fortschreibung des gleichen Inhalts, sondern die drei Bücher können eigenständig nebeneinander stehen.

Das Buch richtet sich an Software-Entwickler und Systemadministratoren, die bereits Grundkenntnisse zu Windows Installer besitzen, denn selbst die Einführungskapitel gehen schnell in die Tiefe und geben Einblicke “unter die Haube” der Windows Installer Technologie.

Daneben enthält das Buch auch eine Einführung in das Open Source Tool WiX (Windows Installer XML), ein Werkzeug zum Erstellen von Installationspaketen, das Microsoft auch intern einsetzt, sowie in die Deployment Tools Foundation (DTF), eine Erweiterungsbibliothek für Windows Installer, die ebenfalls aus dem Hause Microsoft stammt. Die Installations-Beispiele im Buch sind alle in WiX geschrieben. Andere (kommerzielle) Tools zum Erstellen von Installationsprogrammen werden nicht behandelt.

Das Buch erklärt die Funktionsweise von Windows Installer und wie er mit anderen Teilen des Betriebssystems zusammenarbeitet. Um nur ein paar Beispiele zu nennen:

Im Kapitel über die Benutzerkontensteuerung (UAC) wird auch die Intention dieser Neuerung in Windows Vista beleuchtet und was dabei hinter den Kulissen des Berechtigungssystems vor sich geht.

Im Kapitel über den Restart Manager erfährt man auch, wie ein Systemstart abläuft und welche Registry-Einträge in welcher Reihenfolge für Autostart-Aktionen ausgewertet werden.

Ein ausführliches Kapitel behandelt externe Benutzeroberflächen, ein Thema, das allein mit der Dokumentation von Microsoft kaum zu bewältigen ist. Der Quelltext steht – wie für alle Beispiele im Buch – als Download zur Verfügung.

Auf diese Weise vermittelt das Buch ein fundiertes Verständnis von Windows Installer im Zusammenhang mit anderen Teilen des Betriebssystems.

 

Beta Test MSI 5 in Windows 7

Windows Installer 5 is included in the Windows 7 Beta. In addition to bug reporting Microsoft asks for “Scenario Feedback”. Microsoft describes more than 250 usage scenarios that you can try and report your satisfaction and whether you think this feature is ready for RTM. Seven of these scenarios are about Windows Installer, like installing large MSI packages, installing applications per-user, or configuring services.

I’d highly encourage every setup developer to get the beta and run your setup on it. Now is the time to report any problems to Microsoft, so they can fix them or add workarounds (it’s common practice for Microsoft to add shims for specific applications) or to identify areas where your setup needs to be adjusted.

A number of installer related issues have already been identified - not bugs in MSI itself but incompatibilities – which are causing problems like missing or wrong icons or even crash the installer engine.

You may also have to adjust some functionality of your setup. For instance, the Quick Launch Bar is gone (it’s deprecated and hidden by default).

MSDN and TechNet subscribers have unlimited access to the Windows 7 Beta. Everyone else can download it through February 9th. The beta is available in five languages.

Posted by stefan | 1 comment(s)

MSI 5.0 Beta SDK and Documentation available

Beta documentation for the latest version of Windows Installer is now available for online reading. The online documentation for MSI 5.0 was built on January 15, 2009.

The Windows 7 SDK has been published about a week earlier. It includes an older version of the documentation, built on November 21, 2008, and new versions of tools like Orca.

Windows Installer 5 Documentation

The online documentation on MSDN is a convenient way to see what’s new in MSI 5.0 without having to download and install the SDK (see below).

(Note: Some MSDN pages don’t render properly for me today. Not sure what’s causing this.)

Some notable news in MSI 5:

Version Numbers

As expected, VersionMsi is now “5.00”. Maybe a bit suprising, VersionNT for Windows 7 is ”601”. That’s because Windows 7 internally is version number 6.1. Microsoft did this to avoid compatibility problems with setups or applications that check the major version number of Windows and might refuse to run if it’s larger than 6.

User Interface

A new Hyperlink control can be placed on dialogs. It will open the default browser and only supports HTML. When such a setup is run on an older version of the MSI runtime, the Hyperlink control is not displayed at all.

msi-hyperlink-control

New control events MsiPrint to print the content of a ScrollableText control (typically used to display a license agreement) and MsiLaunchApp to start a program that has been installed by the package. The latter references the File table, so it can’t be used to start a program that’s not included in the setup.

Service Configuration

There’s a new standard action called MsiConfigureServices and two related tables MsiServiceConfig and MsiServiceConfigFailureActions. I haven’t figured out yet how they work together with the other service related tables and actions.

Per-User Installations

Setting the new MSIINSTALLPERUSER will automatically redirect files and registry entries to per-user locations, as described in a previous post. For example, ProgramFilesFolder is automatically set to %localappdata%\programs if you do a per-user install.

Configuring Permissions

The MsiLockPermissionsEx table is a replacement for the LockPermissions table. According to the documentation a package should not contain both tables. If this won’t be changed in the RTM version it will limit your ability to create msi packages that will also work with previous versions of the MSI runtime. Instead of Domain, User and Permission it uses security descriptor definition language (SDDL) to indicate permissions to apply to the selected object. A new column data type FormattedSDDLText has been added for this purpose. The MsiLockPermissionsEx also has a Condition column to decide whether to apply the specified permission.

Speeding up large install packages

The new MSIFASTINSTALL property can be set on the command line or in the Property table to avoid creation of a system restore point, skip some costing tasks, reduce the frequency of progress messages, or any combination of these.

Setting Shortcut Properties

According to the documentation, the MsiShortcutProperty table enables Window Installer to set properties for shortcuts that are also Windows Shell objects. (I have no idea what that means.)

Windows Installer API

There are three new installer functions: MsiEnumComponentsEx, MsiEnumClientsEx and MsiGetComponentPathEx.

ICE Validation and Automation Interface

Finally there are five new Internal Consistency Evaluators (ICEs) and some additions to the automation interface which you can find in the documentation.

Windows Installer 5 SDK

The SDK for MSI 5.0 is part of the Windows 7 SDK. It’s currently only available in form of a 1.3 GB .iso file download. You either have to burn this .iso to a DVD or mount it as a drive in Virtual PC or using some other tool. Then you can install the SDK from that drive.

Win7-SDK-Welcome

Among other tools the SDK includes the Orca MSI table editor version 5.0.6764.0

Orca-version-5-0-6764

Download the SDK .iso file:
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1: BETA