Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If DotCheck() Then
- WScript.Echo "Exists!"
- End If
- Function DotCheck()
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
- Set colItems = objWMIService.ExecQuery("Select Name, Version from Win32_Product Where Name Like 'Microsoft .NET Framework%'")
- DotCheck = False
- For Each objItem in colItems
- If InStrRev(objItem.Version, "4.5.") Then
- DotCheck = True
- Exit For
- End If
- Next
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement