radyofon Posted April 28, 2014 Share Posted April 28, 2014 Although Key says no. What is the problem. Help me please. I want to do or not have subkey. But it does not. Message say "no key". However there.I think the problem { } $key = "{4A03706F-666A-4037-7777-5F2748764D10}" If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" EndIf $var = RegRead($uninstall_path, $key) If $var = True Then MsgBox(0, "", "key found") Else MsgBox(0, "", "no key") EndIf Link to comment Share on other sites More sharing options...
Danp2 Posted April 28, 2014 Share Posted April 28, 2014 RegRead doesn't return a True / False result. You need to reread the help file. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
radyofon Posted April 28, 2014 Author Share Posted April 28, 2014 (edited) It doesn't work again. $key = "{4A03706F-666A-4037-7777-5F2748764D10}" If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" EndIf If $var = RegRead($uninstall_path, $key) = "" Then MsgBox(0, "", "no key") Else MsgBox(0, "", "key found") EndIf Edited April 28, 2014 by radyofon Link to comment Share on other sites More sharing options...
Danp2 Posted April 28, 2014 Share Posted April 28, 2014 $key = "{4A03706F-666A-4037-7777-5F2748764D10}" If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" EndIf $var = RegRead($uninstall_path, $key) If $var = "" Then MsgBox(0, "", "no key") Else MsgBox(0, "", "key found") EndIf You could also check the value of @error. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
radyofon Posted April 28, 2014 Author Share Posted April 28, 2014 (edited) $key = "{4A03706F-666A-4037-7777-5F2748764D10}" If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" EndIf $var = RegRead($uninstall_path, $key) If $var = "" Then MsgBox(0, "", "no key") Else MsgBox(0, "", "key found") EndIf You could also check the value of @error. It doesn't work. What is the problem. I don't know. I think { } symbol. {4A03706F-666A-4037-7777-5F2748764D10} subkey is problem. There is in the registery subkey. But script isn't found. Edited April 28, 2014 by radyofon Link to comment Share on other sites More sharing options...
Danp2 Posted April 28, 2014 Share Posted April 28, 2014 Ok... so you actually need to append to key to the path to get the complete keyname. Try this: $key = "{4A03706F-666A-4037-7777-5F2748764D10}" If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" EndIf $var = RegRead($uninstall_path & $key, 'InstallSource') If $var = "" Then MsgBox(0, @error, "no key") Else MsgBox(0, "", "key found") EndIf Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
radyofon Posted April 28, 2014 Author Share Posted April 28, 2014 (edited) still the same. No changes.I tried this. Could you try on your pc. Edited April 28, 2014 by radyofon Link to comment Share on other sites More sharing options...
Danp2 Posted April 28, 2014 Share Posted April 28, 2014 This code works on my machine. What OS are you running? What version of Autoit? What steps have you followed to verify that the key actually exists on your machine? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jguinch Posted April 28, 2014 Share Posted April 28, 2014 (edited) If @OSArch = "X64" Then $uninstall_path = "HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Else $uninstall_path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" EndIf No ? Edited April 28, 2014 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF 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