Problem detecting installed application on Win Svr 2003 x64
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, 开发者_如何学JAVArepeat 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.
OK. Finally worked out sort of what was going on.
The wizard was compiled as x86 and I think registry virtualisation was getting in the way. The x86 wizard works just fine on all other WinOS (32 and 64bit) but on Server 2003x64 it didn't. I guess that the reg entries created by WI were hidden from an x86 process.
Recompiling as MSIL means it now works everywhere, including Server 2003x64.
精彩评论