[wix-users] why does 64 bit bundle install key/value pairs under the 32 bit HKLM/Software/Win6432Node registry key?

Ian Bell ib at ianbellsoftware.com
Wed Oct 12 16:59:47 PDT 2016


Hello Jacob,

Yes, 32 processes write to 32 bit keys is the norm but...my experience has
always been that installation packages which install 64 bit processes always
write application specific information to 64 bit registry locations.   This
is the first time I encountered a situation where a 64 bit application has
to query a 32 bit registry location for 64 bit application specific
information.   

To provide you with some context, my application includes a feature that
notifies the user when a new release is available and then, with the user's
approval, installs the new release without requiring any further user
intervention.   I just upgraded the application from VS2010 to VS2015 and
this required replacing the old VS installers with new WIX installers.
After the upgrade, my unit, integration and specification test for this
installation feature failed and I was puzzled because I could see the MSI
added information in the appropriate 32 bit and 64 bit registry locations.
With a fair bit of trial-and-error testing, I found the WIX SETUP installer
for the 32 bit version of my application added additional information to the
32 bit registry location.   But, when I ran the WIX SETUP installer for the
64 bit version of my application then I could not find any comparable
installation information in the 64 bit registry location - for now obvious
reasons.   I did not think to check if the WIX installer was 32 and/or 64
bit because all internet postings I have read showed a WIX project in VS
could be used to deploy both 32 and 64 bit versions of that application.   I
assumed that building a WIX deployment project under the 32 bit Solution
Platform created a 32 bit deployment program while that built under the 64
bit Solution Platform created a 64 bit deployment program.  I was wrong to
make this assumption.   Nevertheless, it is my opinion that a 64 bit
application should not have to look for application specific information in
32 bit registry locations, doing so adds an extra layer of 'unexpected
complexity' to source code and that this definitely qualifies as 'code
smell'.

As to your question, my application uses information in the registry
'UninstallString' to locate the WIX SETUP installer and then to indirectly
uninstall itself.   Regarding your suggestion to use existing logic of dutil
in Butil.cpp, at this point, I am very reluctant to dig into a code base
that I have not looked at or have time to learn.   Thanks for the suggestion
but this will have to wait for another time.

I should also mention that I am attempting to resolve another WIX SETUP
related problem.   Specifically, when uninstalling my application then 10%
to 20% of the time the WIX SETUP installer does not completely delete
installation related registry setting as well as entries in the
'c:\ProgramData\Package Cache\[GUID]\' subdirectory.   This too is wreaking
havoc on my unit, integration and specification tests.   I have spent just
over a week in trial-and-error tests in trying to identify and resolve these
problems.   Currently, the only work around solution I've found is to
specify a log file and this seems to eliminate the uninstall problem.   As
you can probably guess, I am a little frustrated at how long it is taking to
work through these issues.   Overall, my experience using WIX has been
positive.   But it does involve a steep learning curve as well as a great
deal of trial-and-error to see what works and what does not work.  

Finally, I would like to express my appreciation for the time you and others
take to respond to my request for support.   It took me a week to understand
what the right question was to post in this mailing list but less than an
hour to get the right answer.    

Cheers,

Ian


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Hoover, Jacob
Sent: 12-Oct-16 15:36
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] why does 64 bit bundle install key/value pairs
under the 32 bit HKLM/Software/Win6432Node registry key?

32 bit processes write to 32 bit keys.... It would be smell if burn
registered elsewhere.

Your app shouldn't need to look in the registry for the bundle info, but if
it does it should use the existing logic inside of dutil in Butil.cpp.  If
your process is a 64 bit process, this code would have to be tweaked to only
access the 32 bit locations.  I still don't see a reason as to why your
application would need to know about the UninstallString, but with a given
bundle upgrade code you can find this
(BundleEnumRelatedBundle->BundleGetBundleInfo).
	
Note, only the bundle registration is done in 32 bit land, if your bundle
installs 64 bit MSI's then they register into the 64 bit location. If there
is a configuration option your BA collects, then one would think you would
pass it to your application installer via a MSIProperty, and then your MSI
puts it in the registry where it sees fit.  Using that pattern, then your
application doesn't need to care about a bundled install vs a bare install,
as the location will be the same for both.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Ian Bell
Sent: Wednesday, October 12, 2016 2:02 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] why does 64 bit bundle install key/value pairs
under the 32 bit HKLM/Software/Win6432Node registry key?

Burn only writes to the 32 bit registry?   OUCH - the 'code-smell' is
already detectable.   JJJ 

 

The WIX based MSI installer adds configuration information to 32 bit or 64
bit registry keys depending on which soluction platform (i.e. 32 bit or 64
bit) of the WIX base MSI project is built in VS2015.   So far, so good.
Now, you have just confirmed the same is not true for WIX based SETUP (i.e.
bundle) installers - these installers only add configuration information to
32 bit registry keys.  Here is the problem.  My app needs to know where to
find configuration information added to the registry by WIX based MSI and
SETUP installers (e.g. the 'UninstallString'  key/value pair).   If the 64
bit version of my application was installed using the WIX based MSI
installer then my application needs to look for the installer added
information in the 64 bit registry keys (this is the expected location).
On the other hand, if the 64 bit version of my application was installed
using the WIX based SETUP installer then my application needs to look for
the installer added information in the 32 bit registry keys (this is the
unexpected location and where the 'code-smell' begins).   The question is,
how does the 64 bit version of my application know whether it was installed
using the WIX based MSI installer or the WIX based SETUP installer?   There
are several hacks that come to mind such as writing a custom installer that
adds this extra information to the registry (i.e. was the application
installed using an MSI or a SETUP installer) and rewriting the source code
to accommodate this hack, hence the 'code-smell'.   Oh well, I'll just have
to decide which of these hacks is the lesser evil and get on with it. 

 

Anyways, thanks you for responding so quickly.   Now I can start to grapple
with the next WIX based SETUP hiccup. J

 

Cheers,

 

Ian

 

 

 

 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Bob Arnson
Sent: 12-Oct-16 13:22
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] why does 64 bit bundle install key/value pairs
under the 32 bit HKLM/Software/Win6432Node registry key?

 

Yes. Burn is currently 32-bit.

 

-----Original Message-----

From: wix-users [ <mailto:wix-users-bounces at lists.wixtoolset.org>
mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ian Bell

Sent: Wednesday, 12 October, 2016 12:59

To:  <mailto:wix-users at lists.wixtoolset.org> wix-users at lists.wixtoolset.org

Subject: [wix-users] why does 64 bit bundle install key/value pairs under
the 32 bit HKLM/Software/Win6432Node registry key?

 

The 32 bit version of my WIX setup bundle adds key/value pairs under the 32
bit HKLM/Software/Win6432Node/Microsoft/Windows/CurrentVersion/Uninstall

registry key.    Examples of the keys added to the registry are

BundleCachePath, BundleVersion, QuietUninstallString and UninstallString.

Now, I found the 64 bit version of my WIX setup bundle also adds key/value
pairs under the 32 bit
HKLM/Software/Win6432Node/Microsoft/Windows/CurrentVersion/Uninstall

registry key and this is not where I expected to find the 64 bit key/value

pairs.   Instead, I expected the 64 bit version of my WIX setup bundle to

install under  these key/value pairs under the 64 bit registry key

HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall.   My application

needs to know where the key/value pairs installed by my WIX bundle are

located in the registry.    Is it normal for the 64 bit version of the setup

bundle to add these key/value pairs to the 32 bit version of the registry
key?

 

 

Thanks,

 

 

Ian

 

 

 

____________________________________________________________________

WiX Toolset Users Mailing List provided by FireGiant
<http://www.firegiant.com/> http://www.firegiant.com/

 

____________________________________________________________________

WiX Toolset Users Mailing List provided by FireGiant
<http://www.firegiant.com/> http://www.firegiant.com/


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list