cparralesl
Programmer
Hi all:
I modified a Sript that I found in this forum to get an Inventory SW of my PC. I notice that It did not included the IE.
I need tknow how to obtain the IE version using my Script.
Here is my code:
Thanks inadvance
Cesar Humberto Parrales
Application Support
I modified a Sript that I found in this forum to get an Inventory SW of my PC. I notice that It did not included the IE.
I need tknow how to obtain the IE version using my Script.
Here is my code:
Code:
'On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
strComputer & _
"\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("SELECT * FROM Win32_Product")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objItem in colItems
CSPCName = objItem.Name
CSUSName = objItem.UserName
CSDmName = objItem.Domain
CSSysTyp = objItem.SystemType
Next
For Each objOS in GetObject( _
"winmgmts:").InstancesOf ("Win32_OperatingSystem")
OSCaption = objOS.Caption
OSVersion = objOS.Version
OSRegUser = objOS.RegisteredUser
OSManufac = objOS.Manufacturer
OSEncLevl = objOS.EncryptionLevel
OSOrganiz = objOS.Organization
Next
If colSoftware.Count > 0 Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile( _
"\\Kftnimngfnp01\Publico\SoftwareInventory\" & CSPCName & ".txt", True)
objTextFile.WriteLine "Cumputer Name" & vbtab & _
"User Logged" & vbtab & _
"Domain" & vbtab & _
"System Type" & vbtab & _
"OS Caption" & vbtab & _
"OS Version" & vbtab & _
"OS Registered Userd" & vbtab & _
"OS Manufacturer" & vbtab & _
"OS Encryption Level " & vbtab & _
"OS Organization " & vbtab & _
"SW Caption" & vbtab & _
"SW Version" & vbtab & _
"SW Install Date" & vbtab & _
"SW Install Location" & vbtab & _
"SW Vendor" & vbtab & _
"SW Package Cache" & vbtab & _
"SW Identifying Number"
For Each objSoftware in colSoftware
objTextFile.WriteLine CSPCName & vbtab & _
CSUSName & vbtab & _
CSDMName & vbtab & _
CSSysTyp & vbtab & _
OSCaption & vbtab & _
OSVersion & vbtab & _
OSRegUser & vbtab & _
OSManufac & vbtab & _
OSEncLevl & vbtab & _
OSOrganiz & vbtab & _
objSoftware.Caption & vbtab & _
objSoftware.Version & vbtab & _
objSoftware.InstallDate & vbtab & _
objSoftware.InstallLocation & vbtab & _
objSoftware.Vendor & vbtab & _
objSoftware.PackageCache & vbtab & _
objSoftware.IdentifyingNumber
Next
objTextFile.Close
Else
WScript.Echo "Cannot retrieve software from this computer."
End If
Thanks inadvance
Cesar Humberto Parrales
Application Support