PDA

View Full Version : Get Registry Key Value



NewsArchive
06-21-2012, 12:39 AM
SB 7.7
I am running a 32-bit application on a Windows 7 PC. I issue the Set
Variable %IS_X64_OS% to FUNCTION:Get System Info(WOW^$ Status). %IS_X64
_OS% = 1. My version number resides in the Wow6432Node. I issue the
enable x64 support function but when I get the Registry Key Value with
default set to 'No Version', I do not get my version, I get the default
(No Version). If I get the Registry Key Value with x64 support
disabled, i get the version number expected. I thought setting the x64
support was suppose to go to the correct registry node when getting
entries for a 32-bit application running on a 64-bit O/S. What am I
missing?


--
Darrel (Dee) Witham
Professional Data Services, Inc

NewsArchive
06-21-2012, 12:40 AM
Darrel,

> SB 7.7
> I am running a 32-bit application on a Windows 7 PC. I issue the
> Set Variable %IS_X64_OS% to FUNCTION:Get System Info(WOW^$ Status).
> %IS_X64_OS% = 1. My version number resides in the Wow6432Node.
> I issue the enable x64 support function but when I get the Registry
> Key Value with default set to 'No Version', I do not get my version,
> I get the default (No Version). If I get the Registry Key Value
> with x64 support disabled, i get the version number expected. I
> thought setting the x64 support was suppose to go to the correct
> registry node when getting entries for a 32-bit application running
> on a 64-bit O/S. What am I missing?

Yes, and that is what you get in this case. The installer goes to the
correct registry note!

You are missing that the "enable x64 support function" switches your
installer into 64-bit mode. As a result, it will access the native 64-bit
branch of the Windows registry. But your 32-bit application has the
registry values in the 32-bit branch (which is correct).

You only "enable" support for 64-bit if you have to access the 64-bit area
of the operating system (e.g. "Program Files" instead of "Program Files
(x86)" or "HKLM\Software" instead of "HKLM\Software\Wow6432Node" or if you
have to register native 64-bit components, etc.).

Does this help?

Friedrich

NewsArchive
06-21-2012, 12:41 AM
OK - I only need to enable x64 support if I am on a 64-bit O/S computer
and my application is a 64-bit application. Is this correct?

--
Darrel (Dee) Witham
Professional Data Services, Inc

NewsArchive
06-21-2012, 12:41 AM
Darrel,

> OK - I only need to enable x64 support if I am on a 64-bit O/S
> computer and my application is a 64-bit application. Is this
> correct?

Yes and No <g>.

Sometimes you have to access 64-bit resources even if your own application
is only 32-bit. For example, to check if a specific version of a 64-bit
component is available. Then you can switch into 64-bit mode to handle the
64-bit processing and switch back later to 32-bit to continue the
installation for your 32-bit app.

But for "standard" 32-bit installations, yes, you do not touch the "Set x64
Mode..." setting.

BTW, the "Set x64 Mode" function even allows you to install a 32-bit and
native 64-bit app from the same setup.exe.

Friedrich