in reply to Re^2: Windows XP: StdRegProv
in thread Windows XP: StdRegProv

I found the sollution!

If someone has the same problem, look at the package 'Win32::OLE::Variant'.
(Thanks to a post by 'Bill Luebkert' on 'Nabble').

He gave the next example:
use strict; use warnings; use Win32::OLE; use Win32::OLE::Variant; use constant HKEY_CURRENT_USER => 0x80000001; use constant HKEY_LOCAL_MACHINE => 0x80000002; my $strComputer = Win32::NodeName || '.'; my $oReg = Win32::OLE->GetObject( 'winmgmts:{impersonationLevel=impersonate}!\\\\' . $strComputer . '\\root\\default:StdRegProv') or die "GetObject: " . Win32::OLE->Las +tError(); my $path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\HotFix\\K +B896424"; my @names = ('', 'Backup Dir', 'Comments', 'Fix Description', 'Install +ed', 'Installed By', 'Installed On', 'Service Pack', 'Valid'); my @types = (VT_BSTR, VT_BSTR, VT_BSTR, VT_BSTR, VT_I4, VT_BSTR, VT_BS +TR, VT_I4, VT_I4); my $strKeyPath = $path; for (my $ii = 0; $ii < @names; ++$ii) { my $strValueName = $names[$ii]; if ($types[$ii] == VT_BSTR) { my $strValue = Variant (VT_BSTR|VT_BYREF, '<Not Set>') +; my $ret = $oReg->GetStringValue(HKEY_LOCAL_MACHINE, $strKeyPath, $strValueName, $strValue); $strValueName = '(Default)' if not $strValueName; print "1 $strValueName: '", $strValue->Value(), "'\n"; } else { my $Value = Variant (VT_I4|VT_BYREF, 0); my $ret = $oReg->GetDWORDValue(HKEY_LOCAL_MACHINE, $strKeyPath, $strValueName, $Value); print "2 $strValueName: '", $Value->Value(), "'\n"; } } __END__

Thanks to all of you who helped me with this issue.