Jump to content

RegRead returning blank value


Recommended Posts

I'm new to AutoIT and haven't actively programmed in 10+ years so I apologize in advance if I'm overlooking something stupid. I have a small script that I'm wanting to grab the value of a registry entry. The example I saw online works perfectly, which is: 

#include <MsgBoxConstants.au3>

Local $sVar = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox($MB_SYSTEMMODAL, "Program files are in:", $sVar)
 

So I tried to modify the script to suite my needs, which looks like: 

#include <MsgBoxConstants.au3>

Local $sVar = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Adacel Technologies inc.\PCIG\Channels Geometry\Channel 1", "Aspect Distortion")
MsgBox($MB_SYSTEMMODAL, "Program files are in:", $sVar)
 

I have a value in the registry for "Aspect Distortion" of 1.0, but my MsgBox is just showing a blank box. I have provided screenshots of my registry as well as the MsgBox I am seeing. Any help is greatly appreciated!

 

IGConfigLocator.png

Link to comment
Share on other sites

  • Moderators

@Tr33x0rs I am guessing you are on a 64bit machine. Realize there is a difference between the HKLM hive and the 64-bit HKLM64 hives as explained in the RegRead topic in the help file. This works just fine for me on a 64bit machine with the path you've shown:

#include <MsgBoxConstants.au3>

Local $sVar = RegRead("HKLM64\SOFTWARE\Adacel Technologies inc.\PCIG\Channels Geometry\Channel 1", "Aspect Distortion")
MsgBox($MB_SYSTEMMODAL, "Program files are in:", $sVar)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...