RegRead does not find

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
kdaube
Posts: 86
Joined: 02 Nov 2015, 03:11

RegRead does not find

13 Feb 2018, 11:52

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?
Klaus Daube, Zürich, CH
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: RegRead does not find

13 Feb 2018, 12:02

RegRead, OutputVar, KeyName , ValueName

Code: Select all

FMRelNo := 15
RegRead, fmRoot, HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\FrameMaker\%FMRelNo%, FMHome
MsgBox % fmroot
Not tested.
User avatar
kdaube
Posts: 86
Joined: 02 Nov 2015, 03:11

Re: RegRead does not find

13 Feb 2018, 12:45

BoBo, this gives the same result - "" aka entry not found.
Klaus Daube, Zürich, CH
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: RegRead does not find

13 Feb 2018, 14:13

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...
User avatar
kdaube
Posts: 86
Joined: 02 Nov 2015, 03:11

Re: RegRead does not find

14 Feb 2018, 03:11

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.
Klaus Daube, Zürich, CH
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: RegRead does not find

14 Feb 2018, 05:33

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...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: aitaixy, Google [Bot], Nerafius, RandomBoy and 188 guests