OfficialFX Posted December 11, 2017 Share Posted December 11, 2017 Hello everyone, just trying to get my little Code working - should be reading an Installation Path out of Registry. Code looks like this: Global $InstCheck = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\NootNoot\ClientChat", "InstallPath") If @error Then ConsoleWrite(@error) Else ConsoleWrite($InstCheck) EndIf The error level i'm getting is 1 (Can't open Key). Did I Implement it wrong? I'm not that fond of the windows registry. Registry looks like this: https://imgur.com/a/HzXWg Thanks in advance! FX Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 11, 2017 Moderators Share Posted December 11, 2017 (edited) You have verified the Key is present? And if so, is it in the x86 portion of the hive (HKLM) or the x64 (HKLM64)? You can try #RequireAdmin at the top of your script, but I am going to guess you need HKLM64 Edited December 11, 2017 by JLogan3o13 "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 More sharing options...
Developers Jos Posted December 11, 2017 Developers Share Posted December 11, 2017 (edited) Are you running the 32 or 64 bits version of AutoIt3? the 32bit version will open a different software hive, namely: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NootNoot\ClientChat unless you specify: RegRead("HKLM64\SOFTWARE\NootNoot\ClientChat", "InstallPath") Jos Edit: Close call but just too slow Edited December 11, 2017 by 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. Link to comment Share on other sites More sharing options...
OfficialFX Posted December 12, 2017 Author Share Posted December 12, 2017 Ah okay, I'm not sure about it which one I'm running - currently at work, I'll let you know when I'm at Home - But it should be the 32 Bit Version. So I just need to use RegRead("HKLM64\SOFTWARE\NootNoot\ClientChat", "InstallPath") instead of the Path I used before? (So that it reads that key regardless of 64 Bit or 32 Bit Version? Link to comment Share on other sites More sharing options...
OfficialFX Posted December 12, 2017 Author Share Posted December 12, 2017 Okay, thanks @Jos and @JLogan3o13 - Script is now working with HKLM64. And indeed, I've got the 32-bit Version of Autoit installed. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 12, 2017 Developers Share Posted December 12, 2017 Key thing here was to understand the issue and you try the suggestions... that's why I didn't respond to your initial response as it is easier to simply test. Enjoy, 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. Link to comment Share on other sites More sharing options...
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