roteme has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I would like to check if some program installed on Win machine.
I wrote the following simple code to check it:
use Win32::Registry; # $SERVER_PLATFORM = x86 or x64 - i set it before in other function if ($SERVER_PLATFORM eq "x86") { $Registry = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ +5C65E4AB-BDF9-4784-968F-2FC6151B1637}'; } else { $Registry = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ +B2AE58F9-BF87-4345-9A48-B4C855A484FD}'; } if ($HKEY_LOCAL_MACHINE->Open($Registry,$hkey) ) { print "Found Software YYY installed on the machine\n"; } else { print "Software YYY does not installed on the machine\n"; }
The above code successfully run on 32 bit machine.
On 64 bit machine the product ID exist only under the following registry path:
SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2AE58F9-BF87-4345-9A48-B4C855A484FD}And doesn't exist under the default registry path (Wow6432Node folder):
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{B2AE58F9-BF87-4345-9A48-B4C855A484FD}How I could make my program to read registry values on x64 bit machine from SOFTWARE\Microsoft\… and not from Wow6432Node folder
Please advice
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl registry reflection – How?
by Anonymous Monk on Mar 19, 2012 at 06:59 UTC | |
by roteme (Acolyte) on Mar 19, 2012 at 09:14 UTC | |
by Anonymous Monk on Mar 19, 2012 at 14:04 UTC | |
|
Re: Perl registry reflection – How?
by wwe (Friar) on Mar 21, 2012 at 11:37 UTC | |
by roteme (Acolyte) on Mar 28, 2012 at 12:31 UTC | |
by roteme (Acolyte) on Mar 29, 2012 at 04:38 UTC | |
by Anonymous Monk on Mar 29, 2012 at 04:45 UTC | |
by roteme (Acolyte) on Mar 29, 2012 at 07:13 UTC | |
|