http://www.perlmonks.com/index.pl?node_id=347786

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Matt Bazan
Sent: terça-feira, 29 de junho de 2004 14:45
To: [EMAIL PROTECTED]
Subject: Using WMI to obtain workstation software inventory

Hi,
        The following code is what I've been trying to use in order to
get a listing of installed software on workstations.  When running,
however, it only prints out 3 of the 2 dozen or so installed software
products.  Can someone look it over and see where I've gone astray?
Thx.

my $WMI =
Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate,
                                                    (security)}//$1") {
# $1 contains remote
# workstation IP
my $SOFTWARE = $WMI->InstancesOf("Win32_Product");
foreach my $PRODUCT (in ($SOFTWARE) ) {
    $SW_PACKAGE = $PRODUCT->Name;
    print "$SW_PACKAGE\n";
}

Matt

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to