Technical Posted December 2, 2013 Posted December 2, 2013 (edited) Hello, I'm back since quite a long time... I'm trying to use the RegRead to read a registry key. The proposed example is working: Local $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion", "ProgramFilesDir")MsgBox(4096, "Program files are in:", $var) But I'm trying to read other keys and @error returns 1 (unable to open requested key). I'm running as admin (with #RequireAdmin at the beginning of the script). #RequireAdmin Local $path = RegRead ( "HKEY_LOCAL_MACHINESOFTWAREAVAST SoftwareAvast", "ProgramFolder") MsgBox(4096, "The avast! path is:", $path) #RequireAdmin Local $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREGRETECHGomPlayer", "ProgramFolder") MsgBox(4096, "The GOM path is:", $var) What am I doing wrong? How to achieve reading that keys? I'm on Windows 8.1 x64. Thanks. Edited December 2, 2013 by Technical
Developers Jos Posted December 2, 2013 Developers Posted December 2, 2013 Try reading the x64 hive as you probably are running the x86 version of AutoIt3: #RequireAdmin Local $path = RegRead ( "HKEY_LOCAL_MACHINE64\SOFTWARE\AVAST Software\Avast", "ProgramFolder") MsgBox(4096, "The avast! path is:", $path) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Technical Posted December 2, 2013 Author Posted December 2, 2013 It does not seem to be this. I'm running: AutoIt3_x64.exe "my_script" with Local $path = RegRead ( "HKEY_LOCAL_MACHINE64SOFTWAREAVAST SoftwareAvast", "ProgramFolder") or AutoIt3.exe,exe "my_script" with Local $path = RegRead ( "HKEY_LOCAL_MACHINESOFTWAREAVAST SoftwareAvast", "ProgramFolder") and I'm getting the same results. I also compiled the script for x64 and x32 (with proper hives on them) and got nothing. I'll also have to discover how to detect x32 or x64 to automate... Thanks for your help.
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