Jump to content
Sign in to follow this  
OfficialFX

RegRead won't read

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 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!

Share this post


Link to post
Share on other sites

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 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.
  :)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...