WMI Query for list of hotfixes installed in a system?

醉酒当歌 提交于 2019-12-08 05:15:31

I have figured out the answer for this myself!! There is a vbscript option provided here.

The perl version goes like this..

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";
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!