Problem detecting installed application on Win Svr 2003 x64

Posted by PD on Stack Overflow See other posts from Stack Overflow or by PD
Published on 2010-06-18T15:10:39Z Indexed on 2010/06/18 15:13 UTC
Read the original article Hit count: 311

I have an x86 Windows application that consists of a couple of services and a client ui.

Due to various issues with persuading the various MSIs to upgrade properly, the installation process is now governed by a wizard-style program that detects what is currently installed and handles upgrades by storing the user's current settings, uninstalling the existing software and installing the new version(s).

The basic process is:

  • Look in HKLM\Software\Classes\Installer\Products
  • Loop through the GUID keys therein looking for ProductName="(my app name)"
  • If not found, repeat starting from HKCU\Software\Microsoft\Installer\Products instead
  • If found, offer the user an upgrade (as described earlier) else a clean install (i.e. user is asked various questions by the wizard)

Now, this works just fine on pretty much any Windows platform you care to mention, from XP up. It fails only on Windows Server 2003 x64, in that an existing installation is not detected by the wizard - despite the exact same registry keys being present as are on any other platform I test on.

It's fine on:

  • XP x32
  • Vista x32, x64
  • Server 2003 x86
  • Server 2008 x86, x64
  • Server 2008 R2 x64
  • Windows 7 x86, x64

It's only Server 2003 x64 that seems to exhibit this issue.

© Stack Overflow or respective owner

Related posts about c#

Related posts about installer