List Information About the Binary Files Used by an Application

2018-09-22 01:07

阅读:473

  Description
Returnsthenameandproductcodeofbinaryinformation(suchasbitmaps,icons,executablefiles,andsoon)usedbyaWindowsInstallerapplication. ScriptCode
复制代码 代码如下:
varwbemFlagReturnImmediately=0x10;
varwbemFlagForwardOnly=0x20;

varobjWMIService=GetObject(winmgmts:\\\\.\\root\\CIMV2);
varcolItems=objWMIService.ExecQuery(SELECT*FROMWin32_Binary,WQL,
wbemFlagReturnImmediatelywbemFlagForwardOnly);

varenumItems=newEnumerator(colItems);
for(;!enumItems.atEnd();enumItems.moveNext()){
varobjItem=enumItems.item();

WScript.Echo(Caption:+objItem.Caption);
WScript.Echo(Data:+objItem.Data);
WScript.Echo(Description:+objItem.Description);
WScript.Echo(ProductCode:+objItem.ProductCode);
WScript.Echo(SettingID:+objItem.SettingID);
WScript.Echo();
}


评论


亲,登录后才可以留言!