Sign in to follow this  
Followers 0
Blueye

RegRead pb with Windows 7 64 bits

4 posts in this topic

#1 ·  Posted (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 UninstallString

The return message is : Error - The system don't find the key or value

After many researchs,there are two reg and regedit command. Two in C:\Windows and two in C:\Windows\SysWOW64

The 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 Test

Launch 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 by Blueye

La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Blueye

La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Blueye

La Connaissance ne s'accroît que si celle-ci est partagée.Knowledge increases only if this one is divided.

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  
Followers 0