August 2007 - Posts

Problems with compiled HTML Help (.chm) files

When the beta of Windows Installer 4.5 became available, first thing I did was downloading the white papers and the SDK documentation, which comes as compiled HTLM Help file msi.chm. But when I launched the help file it didn't work.

When I double clicked the msi.chm file the usual security dialog was displayed, warning me that files downloaded from the internet can be harmful:

Security warning dialog
Security warning dialog

After confirming that I wish to open it, the help window opened, but the content pane only displayed error messages like in these screenshots:

Initial error message after opening the help file
Initial error message after opening the help file

Error message after selecting a topic
Error message after selecting a topic

To see if the problem only affects me I contacted fellow MSI expert Christopher Painter to see if the help file works for him, which it does. Christopher pointed me to the following knowledge base article, but unfortunately this was not the cause for my problem (the msi.chm file was on my local hard disk):

Christopher also suggested that it might be some IE securtity issue. That pointed me in the right direction. I moved the chm file from my NTFS formatted hard disk to a FAT formatted USB memory device, and then back to the hard disk. I did this to remove the information that the file was downloaded from the internet, which Windows stores in an extra stream that can only exist on NTFS.

After this operation the msi.chm file worked! I also reproduced the problem with another .chm file I downloaded from elsewhere, with the same result. So this appears to the a general problem with .chm files.

Later I found another workaround. On the Connect site there also a download manager ActiveX control (called FTM - file transfer manager) which apparently also removes the meta information from the downloaded file. So using FTM instead of directly downloading the msi.chm file also avoids the problem.

Posted by stefan | 4 comment(s)

Prepare for MSI 4.5

The first public beta version of the Windows Installer (MSI) 4.5 runtime, SDK and documentation has just been posted by Microsoft. It's mainly targeted at tools vendors so they can update their authoring and packaging tools to support the new version. But as a setup developer you should also prepare for MSI 4.5, and below are some suggestions how yu can do this. Before you can download the beta files and documentaton, you must register at the Microsoft Connect site, where you can also report bugs and problems - see the Walkthrough for Signing up for Windows Installer 4.5 Beta.

Note: if you are an end user (not developing msi packages) I don't recommend installing MSI 4.5 at this point.

Read the documentation

White papers explaining the goals and changes in MSI 4.5 as well as SDK documentation (msi.chm) are available on the Connect site. Read them to see if MSI 4.5 can help you solving issues you are facing in your install project. But be aware that MSI 4.5 only supports Windows XP SP2,Windows Server 2003 SP1, and higher. Also watch out for the reboot requirements and silent install problems for the MSI 4.5 engine on Windows Vista.

Install and test the beta runtime

First a note fo caution: You should not install the SDK and runtime files on your production or develoment machine! In previous betas this happened to beak the build system. But when testing your msi setup - typically in a virtual machine - you could also use the MSI 4.5 engine. Once MSI 4.5 is released this is a must, because your msi file may be launched on a machine with MSI 4.5 installed, even if you don't redistribute this version with your setup. But it's also useful to test the beta version of the MSI 4.5 engine and report any issues to Microsoft (via the Connect site) so they may be fixed in the release version.

Add flags to your pre-4.5 packages

Windows Installer ignores tables, columns, flags and properties it doesn't know. Therefore MSI 4 packages today work with the MSI 2.x or 3.x runtime - of course without the new functionality. Similarly you can add flags that are new in MSI 4.5 ahead of time, to leverage the new functionality once MSI 4.5 is released. While in many cases this may not make much sense, there's one flag that I think should be set by default in all new msi setups: the msidbComponentAttributesShared attribute in the Component table. It prevents the downgrade of files that are shared across products. Without this flag, uninstalling a patch could downgrade such a file, thus breaking the other product. Read more about Shared Components Robustness in Heath Stewart's blog.

Note that adding not-yet-supported flags to your msi file will result in validation errors, so you should not do this if you plan to submit your product for logo certification before the release of MSI 4.5.

Posted by stefan | with no comments

Operating System Virtualization

In this second article of my series about virtualization, I'll describe what used to be the typical meaning of the word "virtualization" for me until recently: virtual operatig systems.

The virtualization software creates virtualized hardware, in which the guest operating system and its applications run. So there can be mutiple "virtual PCs" (pieces of virtualized hardware) running on one physical PC. There are actually two sub-types in this category: the virtualization software can either run on a host operating system (VMware Workstation, Microsoft Virtual PC) or directly on the hardware (VMware Server, Microsoft Virtual Server).

The virtual PCs are isolated from each other and from the host operating system, but can communicate via (virtual) network adapters or drive shares, and can access devices on the host machine such as the CD-ROM drive or USB devices (there's no USB support in Virtual PC).

The advantage of this technology is that you can run any operating systems side by side: you can run a Linux and a Windows Vista guest on a Windows XP host for instance. VMware even supports Linux as a host.

Virtual machines can easily be reset to their previous configuration which makes them a great tool for testing software in a reproducible configuration. It also helps to test your (setup) program on older versions of Windows and on different service pack levels. And if your setup wrecked the operating system, just reset and you're ready for another try.

For a systems administrator, running multiple operating systems on one piece of hardware can reduce IT costs by consolidating multiple servers into one machine. Virtual machines can also easily be moved from one physical machine to another, for instance in case of a hardware failure.

The disadvantages of operating system virtualization are the disk space and memory use and CPU load they create. All the virtual machines share the resources of the host machine with each other and with the host itself. Another disadvantage is a result of isolation: by default applications in virtual machines can't read or write to the physical hard disk in a way that the host or other virtual machines can share the data. Also an application running in the virtual machine can't integrate or interact with applications on the host (as an office add-in for instance).

Note that there are ways for an application to detect that it is running in a virtual machine, so that it might refuse to run to avoid by-passing of license enforcement tools. It's also possible that malware behaves differently on virtual machines to make it harder for anti-virus experts to analyze it. Malware authors also found ways to escape the virtual glass tube and to infect the host operating system.

You may also need to acquire additional licenses for each operating system instance you install in a virtual machine, depending on the respective license agreement. Therefore it's typically not an option for ISVs to ship their (Windows) software in form of a virtual machine, because they would have to redistribute the operating system with it. Microsoft however uses this technology to make pre-release builds of products like the next version of Visual Studio (code named Orcas) available for download as virtual disk images.

Related information

VMware products

Microsoft products

This was part two of my series about virtualization technologies. Here are links to all parts (will be updated when additional articles are published):

Posted by stefan | with no comments
Filed under:

Virtualization Technologies Overview

"Virtualization" isn't new, but it's becoming more prevalent lately - at least in my perception. There are various types of virtualization: virtual machine software like VMware Workstation or Microsoft Virtual PC are commonly used in software and setup develoment and testing. But I also find application virtualization particularly interesting as an alternative approach to software packaging and deployment, and it might even be an alternative to setup programs for ISVs.

While I'm learning more about virtualization, I plan to blog along the way. As a start, I'll try to summarize the different virtualization technologies.

Operating System Virtualization

The virtualization software creates virtualized hardware, in which the guest operating system and its applications run. So there can be mutiple "virtual PCs" (pieces of virtualized hardware) running on one physical PC. I'll write more about this type of virtualization in a separate blog article.

Products in this category are for example: VMware Workstation and Server, Microsoft Virtual PC and Virtual Server.

Application Virtualization

In contrast to the previous category, only a single application is executed in a partially virtualized operating system. It's running on the physical hardware and is using most of the resources from the "real" operating system. This is another topic for a separate blog article.

Products in this category include Microsoft SoftGrid (formerly Softricity), Altiris SVS, or Thinstall virtualization suite.

Resource Virtualization

This is a shim that Microsoft introduced in Windows Vista to enable restriction of user rights without breaking too many existing applications. If an application tries to write data into locations like the Windows or the Program Files folder, those write accesses are redirected to a special directory in the user's data folder. This happens transparently so the application doesn't notice. The same happens if the application tries to write to the local machine hive of the registry.

The redirection only happens if User Account Control (UAC) is enabled and it doesn't apply to setup programs.

The advantage is that older applications that don't follow Microsoft's application development guidelines and best practices still work on Windows Vista. The disadvantage is that these redirected data are kept in a per-user location so the changes of user A are not visible to user B.

According to Microsoft this shim is going to be removed in some future version. So if your application writes to the Windows or Program files folder you better fix it sooner than later.

Sandboxes and Interpretors

Here the application runs in a sandbox and is often not compiled in native machine code but run though an interpreter.

Java and the Visual Basic Virtual Machine fall in this category.

 

This was part one of my series about virtualization technologies. Here are links to all parts (will be updated when additional articles are published):

Posted by stefan | 3 comment(s)
Filed under:

Are Software Awards of any use ?

You've probably seen those 5-star-ratings, reader's choice and similar awards for software - both commercial and shareware.

In an experiment, Andy Brice discovered that the star-ratings of many download sites have no worth at all. He purposely submitted a non-functional, fake program to more than 1,000 download sites, using the description "This program does nothing at all". Only about half of the sites rejected the software, most of them for unspecific reasons. But 16 sites awared the software five-star-ratings or similar awards. Read the full story for details.

Does that mean that software awards are useless all together? Well, there are a few sites where the software is reviewed by humans. In Andy's test, four sites rejected the software because it was useless.

Other sites are also edited by humans, such as the Open Directory Project (where InstallSite is listed as "Cool Site" in the Computers: Software: System Management: Installers: InstallShield section). I believe that such reviews and ratings created by humans are useful, although you have to keep in mind that they often reflect only one person's point of view. It's also known that user editable sites like Wikipedia have been the target of manipulation attempts.

Somewhere in between are "reader's choice" awards. I don't know how immune there are against manipulations like software manufacturers voting for their own products. But even if they are, "popular" isn't always identical to "good" or "best". On the other hand, you are more likely to find community ressources like newsgroups, forums, blogs and support sites for popular software. So a reader's choice award could be one (of several) factors in deciding which product to use for your purposes.

Posted by stefan | with no comments
Filed under: ,

InstallShield 2008 Express Released

On August 16, Macrovision released InstallShield 2008 Express. This completes the 2008 edition of the InstallShield product family. Express 2008 includes improved support for Windows Vista and UAC, Windows Server 2008 beta, .NET framework 3.0, Windows CE 6.0 and more.

InstallShield 2008 is available in the InstallSite Shop

MSI Readiness Analyzer for Windows Vista Updated

In a previous post I wrote about a free tool from ScriptLogic called "MSI Readiness Analyzer for Windows Vista". ScriptLogic responded to my complaint that common Vista problems slipped through the validation. Version 2 of the tool performs additional tests and is available as a free download.

Setup Guidelines for UAC Compatibility

An article in the Altiris community blog lists best practices that should be followed to make sure your setup works as intended on Windows Vista with User Account Control (UAC).

Posted by stefan | with no comments

Uninstalling MSI Setups created with InstallShield can corrupt Windows

There's a bug in the way InstallShield extracts COM data that can corrupt the operating system when your "Basic MSI" or "InstallScript MSI" setup is uninstalled. Read how Christopher Painter lost TCP/IP settings on his computer because of this problem. This can happen if you use the "COM extract at build" option for a component.

A hotfix for InstallShield 2008 is available but Christopher reports that InstallShield 12 is affected by the same problem. There's no information about previous versions. Macrovision knowledge base article Q113345 also includes instructions for a manual workaround that should work for any versions of InstallShield.

How To Write an Automatic Update System

Here's a link to an eight part series which describes different approaches to inform your customers about available updates to your application and to automatically download and install those updates.

Note that msi setups should not be updated by replacing single files. Instead you should use a .msp patch file and run it to update your application. The mechanism decribed in the article should work well for patches, too. If you digitally sign your patch, and shipped the key in your original .msi file (in the MsiPatchCertificate table) you can even install the patch without requiring administrator privileges. In this case the service that Nir describes in part 5 of the series is obsolete.

The open source Windows Installer XML toolset (WiX) includes an auto-update solution for Windows Installer setups. It is using XML files in the popular RRS format.

Posted by stefan | with no comments

German: dotnetpro 9/07 - WiX 3 und Benutzerkontensteuerung (UAC)

(This article is only available in German)

Auch das neue Heft 09/2007 der Zeitschrift dornetpro behandelt wieder Themen, die für Setup-Entwickler interessant sind.

Unter dem Titel "Installationsroutinen mit Windows Installer XML 3" stellt Andreas Kerl die Struktur und die wesentlichen Sprachmerkmale von WiX-Dokumenten sowie die Neuerungen in WiX Version 3 vor. Andreas arbeitet als Windows Installer Fachmann bei Microsoft und hat die Bücher Inside Windows Installer und Windows Installer 3.1 verfasst.

Ein Artikel von Achim Oellers befasst sich mit "Benutzerkontensteuerung und Virtualisierung unter Windows Vista" und welche Probleme daraus entstehen können.

In der Rubrik "Tipps und Tricks" widmet sich Andreas Maslo Setup- und Update-Tools.

Darüber hinaus enthält das Heft noch zahlreiche weitere Artikel für professionelle Software-Entwickler:

dotnetpro gibt es nur für Abonennten, die Zeitschrift ist nicht am Kiosk erhältlich.

Es gibt ein kostenloses Zwei-Monats-Probeabo, das allerdings erst mit dem folgenden Heft beginnt. Als Abonnent kann man jedoch auch alle bisherigen Ausgaben online abrufen.

Korrektur (22.08.2007): Man kann auf der dotnetPro-WebPage Einzelhefte nachbestellen und einzeln abrechnen. (Danke an Andreas Wittig für den Hinweis)

Posted by stefan | with no comments