my $UninstallRegistryPATH = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Window\CurrentVersion\Uninstall +\{3C3901C5-3455-3E0A-A214-0B093A5070A6}'; my $cmd = "REG QUERY ${UninstallRegistryPATH}"; print "\n----$cmd----\n\n"; my @RegKeys = `$cmd 2>&1`; foreach my $var (@RegKeys) { print "$var" }
Result:
----REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVer +sion\Uninstall\{3C3901C5-3455-3E0A-A214-0B093A5070A6}---- ! REG.EXE VERSION 3.0 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall +\{3C3901C5-3455-3E0A-A214-0B093A5070A6} AuthorizedCDFPrefix REG_SZ Comments REG_SZ Contact REG_SZ DisplayVersion REG_SZ 4.0.30319 HelpLink REG_SZ HelpTelephone REG_SZ InstallDate REG_SZ 20120209 InstallLocation REG_SZ InstallSource REG_SZ C:\313aede3e0764106ff44\ ModifyPath REG_EXPAND_SZ MsiExec.exe /X{3C3901C5-3455-3E0A-A +214-0B093A5070A6} NoModify REG_DWORD 0x1 NoRepair REG_DWORD 0x1 Publisher REG_SZ Microsoft Corporation Readme REG_EXPAND_SZ http://go.microsoft.com/fwlink/?LinkId= +164156 Size REG_DWORD 0x9b34 EstimatedSize REG_DWORD 0x206c7b SystemComponent REG_DWORD 0x1 UninstallString REG_EXPAND_SZ MsiExec.exe /X{3C3901C5-3455-3 +E0A-A214-0B093A5070A6} URLInfoAbout REG_SZ http://go.microsoft.com/fwlink/?LinkId=1 +64164 URLUpdateInfo REG_SZ http://go.microsoft.com/fwlink/?LinkId= +164165 VersionMajor REG_DWORD 0x4 VersionMinor REG_DWORD 0x0 WindowsInstaller REG_DWORD 0x1 Version REG_DWORD 0x400766f Language REG_DWORD 0x0 DisplayName REG_SZ Microsoft .NET Framework 4 Client Profile
</code>

Mike

In reply to Re^3: Failed to check if registry key is exist by RMGir
in thread Failed to check if registry key is exist by roteme

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.