July 2009 - Posts

DON'T Clean up your PC with Windows Installer Clean Up Utility

Currently there are many Twitter posts suggesting the Windows Installer Clean Up Utility. This concerns me and I want to clarify some things about it.

I think these tweets might have been triggered by a blog article that Karl L. Gechlik posted recently: Clean up your PC with Windows Installer Clean Up Utility

The Windows Installer CleanUp Utility (MSICU) is a last resort to work around problems with broken or partially installed Windows Installer (MSI) packages if the regular measures like uninstalling from Add/Remove Programs control panel have failed. However it is not intended for routine maintenance of your computer.

When you install a program with a setup that is based on Windows Installer technology, information about that program is registered in the Windows Installer database. If this information or the setup program itself gets corrupted you may not be able to uninstall or re-install this program, and you might even be unable to install other programs. MSICU can delete such corrupted information in the Windows Installer database.

The first caveat is that it can also remove this information for setup packages that are not corrupted. If you delete such information you will no longer be able to uninstall or maintain the respective program. Using MSICU you can severely damage your system configuration. If it ain’t broke, don’t fix it!

There’s also a misconception about MSICU and this is reflected in the following statement in Karl Gechlik’s blog:

It runs through the registry using command line options to search and remove registry items associated with your application and then it grabs and deletes shared dll’s and other files.

This is not quite correct. MSICU only removes information from the Windows Installer database. It does not remove registry items like COM registration, nor does it delete any program files (including shared DLLs).

msizap

If you look carefully at the lines I highlighted in the above screenshot (which I borrowed from Karl’s blog) you’ll notice that they say:

Removed shared DLL entry: …

Windows keeps a reference count for DLL files that are shared between multiple applications in the registry. This count is used to determine when no application needs the file anymore so that it can savely be deleted. MSICU decrements this counter, but it doesn’t delete the file itself.

The documentation on the MSICU download page also makes this clear:

Be aware that Windows Installer CleanUp Utility will not remove the actual program from your computer. However, it will remove the installation files so that you can start the installation, upgrade, or uninstall over.

So the second caveat: MSICU will not delete files (except the cached .msi file), it will not regain “wasted” disk space, it will not clean your registry, it will not make your computer faster. Quite the opposite: it will leave all installed files on your hard disk as orphans.

To summarize: MSCU is a useful tool if you face a problem with a corrupted Windows Installer package, but most Windows users should never need to use it.

The effect of MSIFASTINSTALL

In MSI 5 there’s a new property MSIFASTINSTALL that can be set on the command line or in the Property table to speed up large install packages. It’s a combination of flags that will avoid creation of a system restore point, skip some costing tasks, reduce the frequency of progress messages, or any combination of these.

Alex Verboon has run some performance tests to see how much installation time is reduced by setting the MSIFASTINSTALL property. He doesn’t explicitly specify which build of Windows 7 he used for his test, but it probably was the RC build (since the beta version has expired and the RTM is not available yet).

Alex Verboon’s blog article:
Reduce software installation time

New Advanced Installer 7.1 brings Windows 7 and WI 5 compatibility and support

On July 8th, 2009 Caphyon Ltd. announced the latest edition of its Windows Installer authoring tool. The new Advanced Installer enables developers and system administrators to easily build and repackage complex applications into reliable, ready to deploy MSI and EXE installers, patches and on-line updates.

The 7.1 release completes our Windows 7 and Windows Installer 5.0 compatibility and support. From new features readily available to your installers to better usability and OS integration, Advanced Installer makes checking for and using the new Microsoft platform a snap.

Multiple user interface improvements are available in this version, both in installers using the Enhanced UI feature and in Advanced Installer itself where a new set of cleaner, modernized and better suited for the Vista/Windows 7 operation systems icons debuts.

New predefined ready-to-use prerequisites, launch conditions, searches and ten new custom ways of searching on the user's computer ensure that your application's install never fails due to problems in third-party frameworks, components or products.

Other improvements in this version:

  • Single Package Authoring for WI 5.0
  • Enhanced Service Configuration for WI 5.0
  • Ability to generate Unicode MSI Databases
  • File associations in Windows Mobile projects
  • New configuration content report for Windows Mobile projects
  • Display progress information on Windows 7 Taskbar for: Auto Updater, Repackager, package build, Enhanced UI installation and EXE bootstrapper installation
  • Added Checklist control in Enhanced UI
  • Added Hyperlink control in Enhanced UI and Windows Installer 5.0 UI
  • Multiple selection ListBox and ListView controls in Enhanced UI
  • ASP.NET registration for an IIS web application
  • Logging support for chained packages
  • Extended search support with 10 additional methods
  • Predefined searches for RegAsm, Regsvr32, Aspnet_regiis and Microsoft Office installation path
  • Microsoft Silverlight predefined prerequisite
  • DirectX 11 predefined launch condition
  • Windows 7 predefined launch condition
  • Refreshed Advanced Installer icon set

Advanced Installer is available in four editions, starting with the Freeware community edition and offering a 30-day trial period for the other editions.

For more information and ordering Advanced Installer please see:
www.installsite.biz/advancedinstaller.htm

(Text based on a press release from Caphyon Ltd.)

What Developers should know about Windows 7 without Internet Explorer

As you've probably read before, in Europe Windows 7 will ship without Internet Explorer. This edition will be called "Windows 7 E" and Internet Explorer will not be included for legal reasons. Users will be able to install IE themselves, but it will not be installed by default. For the same reason, users in Europe won't be able to perform an in-place update from Windows Vista to Windows 7. Instead they need to do a clean install, essentially removing IE from their system.

This means that your application may run on a Windows system without any default web browser. This could cause problems if you try to open a web page from your application or from your setup program.

Note that the underlying "internet web platform component" is present even on Windows 7 E, so things like HTML help and embedded WebBrowser controls will work, but opening a web browser window will not.

The Windows Team has published some developer FAQs around Windows 7 E in their blog:
Windows 7 E Best Practices for ISVs

MSI Compatibility: Lying about VersionNT and ServicePackLevel

MSI 5 on Windows 7 introduces a new application compatibility setting, as Chris Jackson describes in his blog.

To work around too strict OS version checks in LaunchConditions, Windows Installer can automatically try several variations of values for the VersionNT and ServicePackLevel properties to circumvent the condition. For instance it will start with VersionNT=600 (Windows Vista) and ServicePackLevel=14, then count down the SP level (13, 12, …, 0), then repeat the same with VersionNT=502 (Windows Server 2003) and so on, until the LaunchCondition succeeds. This is a per-msi setting on the local machine, which can be turned on using this dialog:

msiappcompat

According to the blog, Windows Installer also sets these properties which might be useful to detect that version lying is going on:

  • SHIMFLAGS
  • SHIMVERSIONNT
  • SHIMSERVICEPACKLEVEL

As far as I know these properties are currently not documented in MSDN.

Original article:
Unraveling the Mysteries of MSI Compatibility Modes in Windows 7