cancel
Showing results for 
Search instead for 
Did you mean: 

RegistryGet return -1 ?

Former Member
0 Kudos

Windows 7 64 bit Professional

PB 12.5

string las_val[]

li_ret = RegistryGet("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server", "InstalledInstances", RegMultiString!, las_val)

li_ret return  -1

but this key exists in registry

whats is wrong?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello Rafael,

I had a customer with a similar issue and Georges suggestion is what solved the problem.  If you had an S number you could view KBA 1912462 explaining that.

Ted Zimmerman

Former Member
0 Kudos

64bit registry nodes can be accessed from 32bit programs when using the registry API functions:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx

Former Member
0 Kudos

We use our app on XP, Windows 7 32 & 64bit. We've never had to change where we read registry values.

A 32bit app will read/write reg values into the WOW6432NODE area by itself. Windows knows to point 32bit apps there, and does it transparently.

The windows Registry editor comes in both bit flavors. Use the start menu to find/run each.

c:\windows\system32\regedit.exe (64bit normally)

c:\windows\syswow64\regedit.exe (32bit)

When opening a 32bit CMD prompt, c:\windows\system32 points to c:\windows\syswow64 so it can run 32bit apps natively

Pull up regedit from each place, check task manager. The 32bit regedit will have *32 behind it's name. 64bit version will not.

Now use the 32bit version of regedit to go find the entries you're looking for. There's a chance that the 32bit registry entries don't exist and they are 64bit only.

Former Member
0 Kudos

Hi Rafai;

  PB is a 32 bit application and thus it only reads the 32 bit side of the registry on a Windows 64bit O/S. You would need to change the RegistryGet ( ) method to explicitly go after the 64bit side of the registry if you have SS64 bit installed to get that value.

Regards ... Chris

Former Member
0 Kudos

Hello,

I think that in W7, the registry for 32 bits application is in a 'sub-node' called 'WOW6432NODE'.

As example on XP you can have HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE and find the value NLS_LANG but with W7 you have HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\ORACLE and find the value NLS_LANG.

I hope this will help you.

Former Member
0 Kudos

On Windows XP this script worked fine.