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.

In reply to Re^3: Windows XP: StdRegProv by jschollen
in thread Windows XP: StdRegProv by jschollen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.