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"; }