dhruba.bandopadhyay Posted July 7, 2006 Posted July 7, 2006 I liked the VBS detect scripts to detect whether .NET is installed and which version.Does anyone know if it's possible to detect whether Microsoft Installer 3.1 (KB893803) or later?Also, does anyone know if it's possible to read file version number of an executable?
gunsmokingman Posted July 7, 2006 Posted July 7, 2006 I liked the VBS detect scripts to detect whether .NET is installed and which version.Does anyone know if it's possible to detect whether Microsoft Installer 3.1 (KB893803) or later?Also, does anyone know if it's possible to read file version number of an executable?Here is a script that will list the KB info you wanted and the version of net frameworked installedStrComputer = "." Dim objQuickFix, RP_1, RP_2, RP_3, RP_4, Ts Dim Uptotal : Uptotal = 0 Dim ObjWMI : Set ObjWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & StrComputer & "\root\cimv2") Dim colQuickFixes : Set colQuickFixes = ObjWMI.ExecQuery("Select * from Win32_QuickFixEngineering")'/-> WMI Querry For The KB If colQuickFixes.Count = 0 Then WScript.Echo "No Installed updates" End If For Each objQuickFix in colQuickFixes RP_1 = objQuickFix.Description RP_2 = objQuickFix.HotFixID RP_3 = objQuickFix.InstalledOn RP_4 = objQuickFix.InstalledBy If InStr(RP_1,"Windows") Then If InStr(RP_1,"KB893803") Then MsgBox "Confirm Window Installer" & vbCrLf & RP_1 & vbCrLf & RP_2, 0 + 32, "Window Installer" End If End If Next Dim NetRpt'/-> Querry For Net Framework Set colItems = ObjWMI.ExecQuery("Select * from Win32_Product") For Each objItem in colItems If InStr(objItem.Name, "Microsoft .NET Framework") > 0 Then NetRpt = NetRpt & vbCrLf & objItem.Version End IfNextMsgBox NetRpt, 0 + 32, "Net Frame Work"Yes to the second question
dhruba.bandopadhyay Posted July 11, 2006 Author Posted July 11, 2006 What is WMI? and what can it do?
gunsmokingman Posted July 11, 2006 Posted July 11, 2006 What is WMI? and what can it do?WMI means Windows Management InstrumentationRead this for more informationWMI InformationThe script posted are for VBS scripting langauge.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now