Registry key string won't read

On x64-bit Windows i reading string at key

HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion

which returns null when it should return string ‘Service Pack 1’. There is no other string in the entire registry. I am using the below code. It works for string ‘ProductName’ in the same key returning the Windows Version but not for CSDVersion containing ‘Service Pack 1’

Dim custRegItem As RegistryItem custRegItem = New RegistryItem("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion") stwindowsVersion.text = ("Windows version: ") + custRegItem.value("CSDVersion").StringValue

Same result reading Wow6432Node. Is it because i have Build Project set on x32 and not x64? I am using unregistered version, cannot set to x64.

Reading the entire key returns these but the Service Pack version is missing.

The unregistered version will only let you run 32 bit.

You should look at that key in Regedit (Windows key-R, then regedit, then Return)

Here, under Windows 10 64 bit Pro, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion contains 27 keys. No service pack either (actually, it is an insider preview so there is probably no SP).

Check Find windows OS version from command line to get the information through a shell to wmic.

Check to access that in Xojo.

You may want to try MBS Plugin class RegistryMBS

There we have Use64bitRegistry flag which allows a 32bit app to see 64-bit registry entries.

Thank you. wmic is fast output. I sent to a ini file which Xojo reads.