Page 1 of 1

RegRead does not find

Posted: 13 Feb 2018, 11:52
by kdaube
Dear helpers,
I have this code with FMtarget being 15

Code: Select all

RegRead, fmRoot, HKEY_LOCAL_MACHINE, SOFTWARE\Adobe\FrameMaker\%FMtarget%\, FMHome
MsgBox, %FMtarget%: %fmRoot%
The answer for fmRoot is "" - although according to the Registry editor there is information available:

Image

The other entry (13) provides correct information, but this has no sub-keys:
Image

What is wrong here?

Re: RegRead does not find

Posted: 13 Feb 2018, 12:02
by BoBo
RegRead, OutputVar, KeyName , ValueName

Code: Select all

FMRelNo := 15
RegRead, fmRoot, HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\FrameMaker\%FMRelNo%, FMHome
MsgBox % fmroot
Not tested.

Re: RegRead does not find

Posted: 13 Feb 2018, 12:45
by kdaube
BoBo, this gives the same result - "" aka entry not found.

Re: RegRead does not find

Posted: 13 Feb 2018, 12:50
by NRV

Re: RegRead does not find

Posted: 13 Feb 2018, 14:13
by RickC
It looks like one app is 64-bit and the other is 32-bit. I'm going to guess that you're using a 64-bit version of Windows and possibly a 32-bit version of AHK?

If so, note the documentation "To read and write entries from the 64-bit sections of the registry in a 32-bit script or vice versa, use SetRegView.". Could this be the reason why you're not getting a value returned?

Hope this helps...

Re: RegRead does not find

Posted: 14 Feb 2018, 03:11
by kdaube
NRV & RickC:
Great! This is it. I am on Win7 x64, but need to compile for both 32- and 64-bit systems. My AHK version is 1.1.26.00 and I have noted
«Assure that AutoHotkeySC.bin is the same as Unicode 32-bit.bin; only this way the compiled scripts run on both x64 and x32 systems.»
Using the statement SetRegView, 64 creates correct results on my system. I will check on my wife's Win7 x32, whether I need to distinguish that.
Again: thank You very much for this information.

Re: RegRead does not find

Posted: 14 Feb 2018, 05:33
by RickC
kdaube wrote:Using the statement SetRegView, 64 creates correct results on my system.
That's good. It was qwerty12, another forum regular, who first alerted me to this issue when I ran into the exact same problem. More info here: https://autohotkey.com/boards/viewtopic ... 32#p102632.

Hope this helps...