Insane RegRead Problem

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Spiderkeys
Posts: 31
Joined: 31 Dec 2015, 07:24

Insane RegRead Problem

24 May 2016, 22:46

This is supposed to be one of this simplest scripts around,

I want RegRead to read variables and return them to me in a msgbox.


First I copy an example for my template from https://autohotkey.com/docs/commands/RegRead.htm

Code: Select all

RegRead, OutputVar, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion, ProgramFilesDir
MsgBox, Program files are in: %OutputVar%
Result is perfect, "Program files are in: C:\Program Files"

So, I could think i could just copy and paste the above and change the locations and let it read any value from the registry so my script goes as

Code: Select all

RegRead, OutputVar, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion, ProgramFilesDir
MsgBox, Program files are in: %OutputVar%

RegRead, OutputVar, HKEY_LOCAL_MACHINE\SOFTWARE\Dropbox\Client, Version
MsgBox, Dropbox version is: %OutputVar%

RegRead, OutputVar, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FC4A0E2E-0CD3-11E6-B80E-005056951CAD}, DisplayVersion
MsgBox, Evernote Display Version is: %OutputVar%
The first one (original one) shows excepted result
second entry shows no value (Blank)
third entry also shows no value (Blank)

It doesn't matter where I go, everywhere returns a blank value except that example template.
gilliduck
Posts: 265
Joined: 06 Oct 2014, 15:01

Re: Insane RegRead Problem

24 May 2016, 23:40

Did you verify that the Reg path is right? I don't have a HKLM\SOFTWARE\Dropbox path in my Registry and I've got Dropbox.
User avatar
Spiderkeys
Posts: 31
Joined: 31 Dec 2015, 07:24

Re: Insane RegRead Problem

25 May 2016, 00:02

Double checked, tripled checked, mine are correct, I find a variable of interest, I go to the key where the value is, right-click, copy key name, paste it in the script, the paste the string value after the comma

Other than that, I'm using Windows 10 if thats the issue...
User avatar
JoeWinograd
Posts: 2203
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Insane RegRead Problem

25 May 2016, 00:57

Check the ErrorLevel being returned from RegRead (add ErrLev=%ErrorLevel% to your MsgBox commands). My guess is that first one will be 0 and the other two will be 1. Next trick is to figure out why.
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Insane RegRead Problem

25 May 2016, 01:55

are you using the 64bit version of ahk?
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
User avatar
Spiderkeys
Posts: 31
Joined: 31 Dec 2015, 07:24

Re: Insane RegRead Problem

25 May 2016, 07:33

Yes, anyway it turns out those keys no longer existed after a reboot, so obviously, problem solved...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 133 guests