Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: How to obtain a list of software applications installed on a Win based PC?

by Anonymous Monk
on Jun 01, 2004 at 15:42 UTC ( [id://358142]=note: print w/replies, xml ) Need Help??


in reply to Re: How to obtain a list of software applications installed on a Win based PC?
in thread How to obtain a list of software applications installed on a Win based PC?

THANKS FOR THIS,...I think it worked! although it dumped out stuff that i don't think that they are installed applications!

here is the output
ActiveState/ Adobe/ Apple Computer, Inc./ ArcSoft/ C07ft5Y/ Classes/ Clients/ DataDirect/ Documentum/ Gemplus/ IDM Computer Solutions, Inc./ InstalledOptions/ InstallShield/ Intel/ JavaSoft/ L&H/ Licenses/ Microsoft/ Netscape/ Nikon/ NVIDIA Corporation/ ODBC/ Perl/ pixology/ PlaceWare/ Policies/ Program Groups/ Reflectent/ Schlumberger/ Secure/ SYBASE/ Symantec/ VisionShape/ VMware, Inc./ Wilson WindowWare/ Windows 3.1 Migration Status/ Description/
This output is very ambigouis! I have Office2003 installed and What I excpected is to see WinWord, Excel, OutLook, Access all to be listed. Also I have never seen -or heard -of some of the listed software in the above output!! So I don't understand what went on there!

Is it possible to use this code below to obtain the information - once it get de-bugged and since I can understand it a bit better than the one using the Registry tie?
use strict; use Win32::Registry; my $Key; if ($HKEY_LOCAL_MACHINE->Open("Software\\Microsoft\\Windows\\CurrentVe +rsion\\Uninstall", $Key)) { print "\nDone1\n"; my %ValueList; $Key->GetValues(\ %ValueList); # nothing happens here! for my $item (keys(%ValueList)) # nor here { print "\nDone2 $item\n"; print "$item : $ValueList{$item}[2]\n"; } print $Key->{DisplayName}."\n"; $Key->Close(); }
Thanks & Your Help is highly appreciated.

Replies are listed 'Best First'.
Re^3: How to obtain a list of software applications installed on a Win based PC?
by Anonymous Monk on Nov 03, 2010 at 05:34 UTC

    Here's what you are looking for.

    #!perl use warnings; use strict; use Data::Dumper; my $Registry; use Win32::TieRegistry ( Delimiter=>"/", ArrayValues=>1, TiedRef => \$Registry, ); my @install_names; foreach my $software ( values %{$Registry->{'HKEY_LOCAL_MACHINE/Softwa +re/Microsoft/Windows/CurrentVersion/Uninstall/'}} ) { next unless my $software = $software->{DisplayName}; next unless $software->[0]; push @install_names, $software->[0]; } print "$_\n" for sort {lc $a cmp lc $b} @install_names;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://358142]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-19 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found