Tr33x0rs Posted August 6, 2017 Posted August 6, 2017 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!
Moderators JLogan3o13 Posted August 6, 2017 Moderators Posted August 6, 2017 @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!
Tr33x0rs Posted August 7, 2017 Author Posted August 7, 2017 You are 100% correct, that was my issue. Thank you very much for the help, I really appreciate it!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now