PDA

View Full Version : Hybrid 32/64 issues



Jonathan Kay
04-11-2016, 09:48 AM
Hi,

A couple of issues:

1. If you are running on a 64-bit platform and have disabled x64 mode, including the 32-bit VC++ 2013 runtime script will enable x64 mode (the script for the 64-bit runtime avoids this problem).

2. There doesn't appear to be anything in the install log to indicate which mode the registry entries were created in. This means only the 32-bit entries are removed. This is painful to work-around, even with a custom uninstall script (you can't process the uninstall queue).

Jon.

linder
04-12-2016, 01:05 AM
Jon,

First of all, "Hybrid 32/64" means that (by default) the installer is running in 64-bit mode on x64 machines and in 32-bit mode on x86 machines. On 64-bit machines it installs native 64-bit versions of your application and on 32-bit machines it installs the 32-bit version. Why are you using the "hybrid" mode? Do you have native 64-bit and 32-bit versions available?

If you would like to install a 32-bit application on both x86 and x64 then you have to use the 32-bit installer type. You can use the "Set x64 Mode..." to enable/disable access to 64-bit resources.

The install log indicates which mode the registry entries were created in. See attached screenshots. I have created a "hybrid" setup and launched it on Windows 10 Enterprise x64. It starts in 64-bit mode and creates the uninstaller application in the 64-bit "C:\Program Files" folder. Then it switches into 32-bit mode and creates a 32-bit HKEY_LOCAL_MACHINE\Software\Jon registry key and a "Bitness" value name. It sets the value to 32-bit. After that it re-enables 64-bit mode and creates a 64-bit HKEY_LOCAL_MACHINE\Software\Jon registry key and a "Bitness" value name. It sets the value to 64-bit. Both registry keys are listed in the uninstall .log.

Then we start the uninstall and it removes the keys and values from both 32-bit and 64-bit registry branches.

I have uploaded my demo project. Can you manipulate it so that it demonstrates your issue?

http://www.lindersoft.com/projects/Hybrid_Jon.zip

Friedrich

Jonathan Kay
04-12-2016, 05:42 AM
Hi,

I'm using the Hybrid mode because we have both 32 and 64-bit versions of our 'server' software. The installer is complex, with a lot of custom dialogs and calls into our dlls for licensing. I'd rather the setup executable be larger than have to maintain two SB projects.

I'm pleased to report that after failing to reproduce in the sample, I discovered that the 64-bit keys already existed - the installer did not create them so they were not removed. You can consider issue (2) resolved.

I've attached the hybrid.sbp file to illustrate issue (1). Select '32-bit', and you'll notice the mode gets changed after including the VC++ 2013 32-bit runtime (the 64-bit version defends against this using the WAS_X64MODE variable).

Jon.

linder
04-13-2016, 06:16 AM
Hi Jon,

You are absolutely right. We have updated the rt_vc2013redist_x86.sbi include script file today. Please go to the "Redistributable Manager" and remove the "Microsoft Visual C++ 2013 Redistributable Package (x86)". Then download it again and this should fix it. Does it work?

Thank you for bringing this to my attention.

Friedrich

Jonathan Kay
04-14-2016, 11:21 AM
Yes thanks, that fixes the problem.

Jon.

linder
04-15-2016, 04:25 AM
Hi Jon,

Perfect! Thank you.

Friedrich