I myself understood the answer for this! There is a vbscript option provided here .
The perl version is as follows.
use Win32::OLE qw( in ); my $machine = "."; my $WMIServices = Win32::OLE->GetObject ( "winmgmts:{impersonationLevel=impersonate,(security)}//$machine/root/cimv2" ) || die "cant call getobject"; my $HotFixCollection = $WMIServices->ExecQuery ( "select * from Win32_QuickFixEngineering" ) || die "Query Failed"; foreach my $hotfix ( in( $HotFixCollection )){ $hotfixID = $hotfix->{HotFixID}; print "Hotfix id is $hotfixID \n"; }
source share