I need a vbscript which will find following list of softwares on my system, and if it is there then it will give detials of that software like version, install date, etc.
1. Office 2007 SP3 / 2010 SP1
2. Chrome details (like Version 34.0.1847.131)
3. IE details (like v10)
4. SAP Logon pad details (like v730)
5. OS details (like: Win7 SP1)
6. PAC File details which is use for internet browsing
7. Acrobat Reader details
8. McAfee details (like v 4.6.0.3122)
9. mcafee ePO Agent details (like v 8.8.0)
10. SCCM Client details (like v5.0)
11. 7-Zip details
12. CutePDF details (Only PDF Printer)
13. Adobe Flash Player details
14. Adobe Shockwave details
15. Java JRE details
Also my concern is that it must run on all versions of windows OS from XP to 8.1
As I am new to vb script so please help me out.
Thanks.
WMI Win32_Product. Look in the repository for numerous examples.
i used following code and it gives all software installed but i need only above mentioned software
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINEstrComputer = "."
strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
strEntry1a = "DisplayName"
strEntry1b = "QuietDisplayName"
strEntry2 = "InstallDate"
strEntry3 = "VersionMajor"
strEntry4 = "VersionMinor"
strEntry5 = "EstimatedSize"
Set objReg = GetObject("winmgmts://" & strComputer & _
"/root/default:StdRegProv")
objReg.EnumKey HKLM, strKey, arrSubkeys
WScript.Echo "Installed Applications" & VbCrLf
For Each strSubkey In arrSubkeys
intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, _
strEntry1a, strValue1)
If intRet1 <> 0 Then
objReg.GetStringValue HKLM, strKey & strSubkey, _
strEntry1b, strValue1
End If
If strValue1 <> "" Then
WScript.Echo VbCrLf & "Display Name: " & strValue1
End If
objReg.GetStringValue HKLM, strKey & strSubkey, _
strEntry2, strValue2
If strValue2 <> "" Then
WScript.Echo "Install Date: " & strValue2
End If
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry3, intValue3
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry4, intValue4
If intValue3 <> "" Then
WScript.Echo "Version: " & intValue3 & "." & intValue4
End If
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry5, intValue5
If intValue5 <> "" Then
WScript.Echo "Estimated Size: " & Round(intValue5/1024, 3) & " megabytes"
End If
Next
You will have to write your own script to customize the results.
Use PowerShell as it is easier to filter.
Here is an example of how to do this in PowerShell:
Get-WmiObject Win32_Product -filter 'Name LIKE "%office" OR Name LIKE "%Chrome%"'
You can add as many "ORs" as you need.
i want to implement the above query in vb script only. As powershell is not possible in my environment.
Please suggest solution in vbscript.
Why is PowerShell not possible? It is installed by default on all new versions of Windows. PowerShell can use WMI to query any current version of Windows.
You only other method is to learn to write scripts and to modify an existing script.
One other choice is to use the software inventory scripts that output to a CSV. Load the CSV into Excel and filter it.