Home > database >  How to operate a 64 - bit Windows 7 registry?
How to operate a 64 - bit Windows 7 registry?

Time:09-18

Change the original program, the user in a 64 - bit Windows 7, I write to the registry to read and write operation has failed! Could you tell me how to modify my original code to read and write registry operation? Thank you

CodePudding user response:

Does anyone know?

CodePudding user response:

64 - bit Windows 7 to read and write registry no problem, let's stick to code up to look at it

CodePudding user response:

refer to the second floor SDHP response:
64 - bit Windows 7 to read and write registry no problem, let's stick to code up to look at it


The code is as follows:
Ll=RegistryGet (HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ "Transaction", "the DBMS," RegString! , the SQLCA. DBMS)

Ll return value 1, as well as Registryset, the return value 1, a success, but I use the registry editor to see, never change!

CodePudding user response:


reference tiger7021 reply: 3/f
Quote: refer to the second floor SDHP response:

64 - bit Windows 7 to read and write registry no problem, let's stick to code up to look at it


The code is as follows:
Ll=RegistryGet (HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ "Transaction", "the DBMS," RegString! , the SQLCA. DBMS)

Ll return value 1, as well as Registryset, the return value 1, a success, but I use the registry editor to see, never change!


Windows 7 64 - bit systems if RegistrySet (HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ "Transaction", "the DBMS," RegString! , the SQLCA. DBMS) then generate registry keys in: HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction path, read it with RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction ", "DBMS," RegString! , the SQLCA. DBMS)
Suggest to write so don't write in the HKEY_LOCAL_MACHINE registry write below the HKEY_CURRENT_USER, system type, or otherwise need to decide first RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ Transaction "... ) determine the return value if failure to read again RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction "... )

CodePudding user response:

I wrote above seems to be wrong, a piece of code is as follows:

Long l [3]
String s
L [1]=RegistrySet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ Transaction ", "DBMS," RegString! , the SQLCA. DBMS)
L [2]=RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ Transaction ", "DBMS," RegString! S)
If [2] (l=1) then
L [3]=RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction ", "DBMS," RegString! S)
End the if
Messagebox (' test results', 'the return value 1:' + string (l [1]) + + string '~ n return value 2:' [2] (l) + '~ n return value 3: + string (l [3]) + + s ~ n results:)

Return results:

Shows the key value should be read directly, only the location is not what you put there

CodePudding user response:

reference 5 floor SDHP reply:
above seems to be wrong, I wrote a piece of code is as follows:

Long l [3]
String s
L [1]=RegistrySet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ Transaction ", "DBMS," RegString! , the SQLCA. DBMS)
L [2]=RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ DZ \ Transaction ", "DBMS," RegString! S)
If [2] (l=1) then
L [3]=RegistryGet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction ", "DBMS," RegString! S)
End the if
Messagebox (' test results', 'the return value 1:' + string (l [1]) + + string '~ n return value 2:' [2] (l) + '~ n return value 3: + string (l [3]) + + s ~ n results:)

Return results:

Shows the key value should be read directly, only the location is not where you put the



The method I tried, you can take to the value, can also be set, but I need to know where is it on

CodePudding user response:

Now the problem is that I can really realize the registry to read and write operations, but why I can't see me through the registry editor to perform the write operation after the results? Using the set changes, GET out the value of the is right, but I have seen in the registry editor or the original value?

CodePudding user response:

In 32-bit programs at a 64 - bit operating system registry information, all belong to the wow6432node this node. So, the original poster you have to determine how much is the client an operating system, and then change an entry
For instance, when in a 32-bit, [HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ ODBC], in a 64 - bit Windows, operation [HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ ODBC]

CodePudding user response:

refer to the eighth floor SBKS response:
64 - bit operating system, the registry information of 32-bit programs are gathered to wow6432node this node. So, the original poster you have to determine how much is the client an operating system, and then change an entry
For instance, when in a 32-bit, [HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ ODBC], in a 64 - bit Windows, operation [HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ ODBC]



I have been able to in the PB to read and write operations of 64 bit Windows 7 registry, my question is why I can't see I changed as a result, I in the program is the key value WOW6432NODE below changes, no problem, but I why in the registry editor could not see I have modified the result?
For example: the executive RegistrySet (" HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node/DZ/Transaction ", "DBMS," RegString! , 'testmis)
Then use the GET the contents of this key value, no problem, it is testmis
But I use registry editor open regedit, look at the key values do not modify before? Why is this?

CodePudding user response:

Does anyone know?

CodePudding user response:

This is not you refresh yourself, press F5 to see see
  • Related