Jump to content

Recommended Posts

Posted

L.S.

Not all registry keys are read. And that is nuisance when some keys are nice checks for existance of certain application. See below a litle test script and the output. Why is output of test 3 and 4 empty??

$test = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ThinPrint", "Lang")
ConsoleWrite("test1:  " & $test & @CR)

$test2 = Regread("HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications", "Wordpad")
ConsoleWrite("test2:  " & $test2 & @CR)

$test3 = Regread("HKEY_LOCAL_MACHINE\SOFTWARE\CBSTEST", "CBSTestWTTLogFile")
ConsoleWrite("test3:  " & $test3 & @CR)

$test4 = Regread("HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip", "Path")
ConsoleWrite("test4:  " & $test4 & @CR)

Output:

test1:  enu
test2:  Software\Microsoft\Windows\CurrentVersion\Applets\Wordpad\Capabilities
test3:  
test4:  

Posted

I discovered that test1 and 2 have a copy of the registry key in Wow6432Node. So now the question is how I can read the keys in the 64bit registry. I am testing a 32-bit application, so the script is x-86. Thanks for reply

Posted

Im assuming you have tried with

#RequireAdmin or

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****

And you have checked you have permissions for those areas?

As long as you are on a 64 bit machine you should be able to check those areas

Posted

Hello Chimeara,

Thanks for the fast reply, In the mean time I found the solution by trial and error:

How simple can it be. If I for the missing output change e.g.

$test4 = Regread("HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip", "Path")
ConsoleWrite("test4:  " & $test4 & @CR) 

into 

$test4 = Regread("HKEY_LOCAL_MACHINE64\SOFTWARE\7-Zip", "Path")
ConsoleWrite("test4:  " & $test4 & @CR)

I get the output correctly.

Regards, Fred

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
×
×
  • Create New...