1. Mario Parietti
  2. PowerBuilder
  3. Tuesday, 11 August 2020 12:46 PM UTC

Hi,

I am using PB 2019 32 bit application on Windows 10 64 bit.

when I call RegistryGet function as in this example:

RegistryGet("HKEY_LOCAL_MACHINE\Software\Intercad\Polis\comune","comune",RegString!,gCodiceComune)

i got the registry value

from HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node

and not from HKEY_LOCAL MACHINE.

the same with RegistrSet function.

Can You please tell me the reason and if there is a way to make it work correctly? 

 

Thanks in advance

Mario Parietti

John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 11 August 2020 14:01 PM UTC
  2. PowerBuilder
  3. # 1

Greetings, Mario -

You are likely the benefactor of Registry Redirection, courtesy of Microsoft:

https://docs.microsoft.com/en-us/windows/win32/sysinfo/32-bit-and-64-bit-application-data-in-the-registry

If you absolutely have to read values out of the HKLM hive with a 32-bit app, from what I read you'll need to disable/enable registry redirection using the RegDisableReflectionKey and RegEnableReflectionKey Windows API functions, since there are no PowerScript functions to accomplish this, as far as I know.

Perhaps a separate question posted to the Appeon Community asking anyone if they have disabled/enabled registry redirection would provide you with some tips or code samples.

Good luck!

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 11 August 2020 14:01 PM UTC
  2. PowerBuilder
  3. # 2
Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Tuesday, 11 August 2020 14:07 PM UTC
  2. PowerBuilder
  3. # 3

Hi Mario,

just update to R2.

https://docs.appeon.com/pb2019r2/whats_new/ch02s06.html

Best,

.m

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.