Blueye Posted May 2, 2011 Share Posted May 2, 2011 (edited) Hi all,I have Windows 7 64 bits and i have a big problem to read a key in the registry.Problem :In my enterprise, i want to read a key to get the uninstall string of specfic software, but regread doesn't read this key (not found).The code :$return=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BEWINTERNET-FR-DME}.UninstallSuite","UninstallString") MsgBox(0,"Return value",$return & "" & @error)@error = 1 but the key exist because it's visible on "Add/Suppress program" in control panel.When i try REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BEWINTERNET-FR-DME}.UninstallSuite /v UninstallStringThe return message is : Error - The system don't find the key or valueAfter many researchs,there are two reg and regedit command. Two in C:\Windows and two in C:\Windows\SysWOW64The solution to find this key is to use the reg command in C:\Windows\SysWOW64.If you want to see the key, use Regedit.exe in C:\Windows\SysWOW64 (note : In taskmanager, the regedit process is 32 bits marked ???)At this time, the solution for me is to use AutoHotKey (sorry) to read my key.If you have a solution to resolve my problem !To make the problem :In C:\Windows\SysWOW64 type REG ADD HKLM\Software\MyKey /v Value /t REG_SZ /d TestLaunch regedit program in the start menu, the key is not visible !!!The code (doesn't work):$retour=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MyKey","Value") MsgBox(0,"",$retour & "" & @error)Lauche regedit in C:\Windows\SysWOW64, the key is visible.Thank's a lot.PS : Excuse me for my poor english, i'm french user. Edited May 2, 2011 by Blueye La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 2, 2011 Moderators Share Posted May 2, 2011 And this? $return=RegRead("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BEWINTERNET-FR-DME}.UninstallSuite","UninstallString") MsgBox(0,"Return value",$return & "" & @error) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Blueye Posted May 2, 2011 Author Share Posted May 2, 2011 (edited) Hello SmOke_N, And this? $return=RegRead("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BEWINTERNET-FR-DME}.UninstallSuite","UninstallString") MsgBox(0,"Return value",$return & "" & @error) Thank's you for your answer, but it doesn't work. Try the command REG ADD ...in C:\Windows\SysWOW64, the key is created but not visible with Regedit or Reg Query (in C:\Windows) or RegRead (return @error = 1) Thank's for your reply. Edited May 2, 2011 by Blueye La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided. Link to comment Share on other sites More sharing options...
Blueye Posted May 2, 2011 Author Share Posted May 2, 2011 (edited) Hello SmOke_N, I find the solution (but it's not very cool) It's work if you add Wow6432Node word in your key to read Code : $return=RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{BEWINTERNET-FR-DME}.UninstallSuite","UninstallString") MsgBox(0,"Return value",$return & "" & @error) That resolve my problem. Thank's for your help. Edited May 2, 2011 by Blueye La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided. 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