Archive: Registry plugin open method


Registry plugin open method
Hi,

I am using registry plugin to read the registry.

I am using following code

${registry::Open} "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" '/K=1 /V=1 /N="Mozilla Firefox"' $R0

It returns me handle in $R0.

And then I tries to find out the path of the mozilla firefox using

${registry::Find} $R0 $R5 $R6 $R7 $R8.

But $R5 returns me blank.

This issue happens only when I am using Mozilla Firefox 4.0 beta version. If I use Firefox 3.6 then it works fine.

How to resolve this issue. What does /k, /n, /v switches indicate?

Thanks,
Akshay


I got the real issue. When we are executing following statement

${registry::Open} "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" '/K=1 /V=1 /N="Mozilla Firefox"' $R0

It is doing the exact match of "Mozilla Firefox" inside the above registry path. Since Mozilla Firefox beta version has subkeys value like "Mozilla Firefox 4.0b7 (x86 en-US)", it is failing.

Is there any switch that I can use with registry::Open, that does substring match not exact match???

Thanx,
Akshay


EnumRegKey?


You don't need to use any searching to find the current Firefox registry. If I recall the Mozilla Firefox key contains a value containing the current version key name.

Stu


That's correct:

Go to "HKLM\SOFTWARE\Mozilla\Mozilla Firefox"
Get the value of "CurrentVersion"
Go to "HKLM\SOFTWARE\Mozilla\Mozilla Firefox\{CurrentVersion}\Uninstall"
Get the value of "Description"
That's where the uninstall data is.