Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 05-21-2018, 03:18 PM
FreakaZoid2 FreakaZoid2 is offline
Senior Member
 
Join Date: Jul 2009
Posts: 330
Default Registry 32/64bit correct way to access

If I want to update the 32bit registry on a 64bit system, what is the best way to accomplish.
Currently and in all previous registry related programs i have written has been to test for the wow6432 node and go from there. But I always have 2 edit/update commands and I was thinking surely there is a way to reference 1 key structure and the system would update the correct key node.
All my changes are for 32bit registry related keys, never 64bit.
Is there a way to just reference a registry key and the OS determine what needs to be updated?
  #2  
Old 05-22-2018, 08:13 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,307
Default

If you compile in 32 bits mode it already does this.
For example: HKEY_CURRENT_USER\Software\YourName
will automatically read the value from HKEY_CURRENT_USER\Software\WOW6432Node\YourName on an x64 and HKEY_CURRENT_USER\Software\YourName on x86
Same goes for writing to it.
  #3  
Old 05-29-2018, 03:54 PM
FreakaZoid2 FreakaZoid2 is offline
Senior Member
 
Join Date: Jul 2009
Posts: 330
Default

Well now I really feel dumb. thank you so much for that info.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.