PDA

View Full Version : Get Related Product



Pierre
08-26-2013, 08:26 AM
Hi,

I'm new with SetupBuilder (8) and I'm evaluating the possibility to switch to setupBuilder from InstallShield.

I've download the vc2008redist sbi example, in there, it used the set function:
Set Variable %_SB_TMP% to FUNCTION:Get Related Product("0") for "%VC2008_UPGRADEGUID%"

This function not seems to work for me, since it never return any version number and keep re-run the redist setup. (I'm on W7 64 bits).

The upgrade GUID seems fine , but i wonder how this function could worked, I'm not seeing the upgradecode anywhere in my registry...

Thanks for the help.

linder
08-26-2013, 09:12 AM
Pierre,

I think you are right. There is something going wrong on x64 in this VC2008 redistributable scenario.

First of all, an UpgradeCode of {DE2C306F-A067-38EF-B86C-03DE4B0312F9} "resolves" to the real code of F603C2ED760AFE838BC630EDB430219F. So you'll NOT find {DE2C306F-A067-38EF-B86C-03DE4B0312F9} but F603C2ED760AFE838BC630EDB430219F as an upgrade code in the registry under Software\Microsoft\Windows\CurrentVersion\Installe r\UpgradeCodes

The "problem" is that the 32-bit Microsoft redistributable does not write this value to the 32-bit branch of the registry but to the 64-bit equivalent. And your installer runs in 32-bit mode and does not check the 64-bit branch.

If you put the following Enable/Disable x64 Support around the "Get Related Product" function in the .sbi, does it work in your case?


Enable x64 Support <---- ADD THIS
Set Variable %_SB_TMP% to FUNCTION:Get Related Product("0") for "%VC2008_UPGRADEGUID%"
Disable x64 Support <--- ADD THIS

This will switch the installer into 64-bit mode processing, then check the 64-bit registry, and then re-set to 32-bit processing.

If this will work for you, we'll update the redistributable package.

Thanks,
Friedrich

linder
08-26-2013, 09:23 AM
We'll do some more tests to see if this is a problem with this specific Microsoft VC2008++ redistributable on x64. We can't find the version number for the installed redistributable anywhere in the x64 registry. I'll keep you posted. I think it's specific to this redistributable.

Friedrich

Pierre
08-26-2013, 09:29 AM
We'll do some more tests to see if this is a problem with this specific Microsoft VC2008++ redistributable on x64. We can't find the version number for the installed redistributable anywhere in the x64 registry. I'll keep you posted. I think it's specific to this redistributable.

Friedrich

Thanks,

P.S. I made a vs2010 from your VS2008 sbi and I've encounter the same problem.
Pierre

linder
08-26-2013, 10:08 AM
Pierre,

We have debugged the process and there is definitely a problem. The VC x86 redistributables write the upgrade code ID to the 64-bit registry branch on x64 systems but they register in the 32-bit registry branch. So we have to add an additional option to the "Get Related Products..." script function ("x86 Module" / "x64 Module") so the runtime can handle this automatically. It's not possible to handle it from the script so my previous "Set x64 Mode..." suggestion does not work!

Thank you so much for bringing this to our attention!

Friedrich

linder
08-26-2013, 10:31 AM
Very good finding, btw. Perfect report, clear and directly to the point!

Thanks again!

Friedrich

Pierre
08-26-2013, 12:04 PM
Very good finding, btw. Perfect report, clear and directly to the point!

Thanks again!

Friedrich

You are welcome,

Note: Examples for to 'Get Related Product' in the PDF help document are not the proper ones, they are from 'Get Registry SubValue'

Pierre

linder
08-26-2013, 12:18 PM
Yes, I also noticed the documentation issues. Definitely caused by 'copy and paste' <g>.

This will be fixed in the next build :)

Friedrich