Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Failed to check if registry key is exist

by roteme (Acolyte)
on Feb 28, 2012 at 07:21 UTC ( [id://956600]=note: print w/replies, xml ) Need Help??


in reply to Re: Failed to check if registry key is exist
in thread Failed to check if registry key is exist

I Failed even if i use the following code:

use Win32::Registry; my $Register = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0 +34106B5-54B7-467F-B477-5B7DBB492624}'; my $hkey; $HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die print "($!) ($?) ($^E +)\n"; $hkey->Close();

If i remove the last entrance key {034106B5-54B7-467F-B477-5B7DBB492624} and run it like the following is working good:

use Win32::Registry; my $Register = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'; my $hkey; $HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die print "($!) ($?) ($^E +)\n"; $hkey->Close();

My question is why? Why {034106B5-54B7-467F-B477-5B7DBB492624} caused to read problem?

I just need to check if some product is installed

Replies are listed 'Best First'.
Re^3: Failed to check if registry key is exist
by Anonymous Monk on Jan 22, 2015 at 20:11 UTC
    Did you ever figure this out? I'm able to reproduce this as well.
      Answer found on stack overflow. Wow64 is the issue - use the system native version of reg.exe %Windir%/sysnative/reg.exe

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://956600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found