loban_ser
Full Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Добрый день! Подскажите как в скрипте определить имя установленного продукта Office или Windows? есть такое: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM SoftwareLicensingProduct",,48) For Each objItem in colItems Wscript.Echo objItem.Name Next но выводит все имена присутствующие в "SoftwareLicensingProduct" Office 15, OfficeProPlusR_Retail edition Office 15, OfficeO365SmallBusPremR_SubTrial5 edition Windows(R), ProfessionalWMC edition Office 15, OfficeO365SmallBusPremR_Subscription2 edition Office 15, OfficeO365ProPlusR_Retail edition Office 15, OfficeO365ProPlusR_Subscription1 edition Office 15, OfficeProPlusR_Grace edition Office 15, OfficeO365SmallBusPremR_SubTrial2 edition Office 15, OfficeO365ProPlusR_SubTrial2 edition Office 15, OfficeO365SmallBusPremR_SubTrial3 edition Office 15, OfficeO365ProPlusR_Grace edition Office 15, OfficeProPlusMSDNR_Retail edition Office 15, OfficeO365ProPlusR_SubTrial1 edition Windows(R), OCUR add-on for all editions Office 15, OfficeO365SmallBusPremR_Subscription4 edition Windows(R), ProfessionalWMC edition Office 15, OfficeO365SmallBusPremR_Subscription3 edition Office 15, OfficeO365SmallBusPremR_SubTrial1 edition Office 15, OfficeO365ProPlusR_Subscription4 edition Office 15, OfficeO365SmallBusPremR_Retail edition Windows(R), ProfessionalWMC edition Windows(R), ProfessionalWMC edition Office 15, OfficeProPlusDemoR_BypassTrial180 edition Office 15, OfficeO365SmallBusPremR_Subscription5 edition Windows(R), ProfessionalWMC edition Office 15, OfficeO365SmallBusPremR_Grace edition Office 15, OfficeO365ProPlusR_Subscription3 edition Office 15, OfficeO365ProPlusR_SubTrial3 edition Office 15, OfficeO365SmallBusPremR_Subscription1 edition Office 15, OfficeProPlusR_OEM_Perp edition Office 15, OfficeO365SmallBusPremR_SubTrial4 edition Windows(R), ProfessionalWMC edition Office 15, OfficeProPlusR_Trial edition Office 15, OfficeO365ProPlusR_SubTrial5 edition Office 15, OfficeO365ProPlusR_Subscription2 edition Office 15, OfficeO365ProPlusR_SubTrial4 edition Windows(R), APPXLOB-Client add-on for EmbeddedIndustry,EmbeddedIndustryA,Embedde dIndustryE,EmbeddedIndustryEEval,EmbeddedIndustryEval,CoreARM,ProfessionalN,Prof essional,ProfessionalWMC,EnterpriseN,EnterpriseNEval,Enterprise,EnterpriseEval Windows(R), ProfessionalWMC edition Office 15, OfficeO365ProPlusR_Subscription5 edition как можно определить точно имя? |