' Listing 1: The ComputerSys Subroutine Sub ComputerSys On Error Resume Next XL.Sheets.Add.name = "ComputerSystem" Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") ' Excel spreadsheet headings. XL.Cells(Row,Col).Value = "AdminPasswordStatus" : Col = Col + 1 XL.Cells(Row,Col).Value = "AutomaticResetBootOption" : Col = Col + 1 XL.Cells(Row,Col).Value = "AutomaticResetCapability" : Col = Col + 1 XL.Cells(Row,Col).Value = "BootOptionOnLimit" : Col = Col + 1 XL.Cells(Row,Col).Value = "BootOptionOnWatchDog" : Col = Col + 1 XL.Cells(Row,Col).Value = "BootROMSupported" : Col = Col + 1 XL.Cells(Row,Col).Value = "BootupState" : Col = Col + 1 XL.Cells(Row,Col).Value = "Caption" : Col = Col + 1 XL.Cells(Row,Col).Value = "ChassisBootupState" : Col = Col + 1 XL.Cells(Row,Col).Value = "CreationClassName" : Col = Col + 1 XL.Cells(Row,Col).Value = "CurrentTimeZone" : Col = Col + 1 XL.Cells(Row,Col).Value = "DaylightInEffect" : Col = Col + 1 XL.Cells(Row,Col).Value = "Description" : Col = Col + 1 XL.Cells(Row,Col).Value = "Domain" : Col = Col + 1 XL.Cells(Row,Col).Value = "DomainRole" : Col = Col + 1 XL.Cells(Row,Col).Value = "FrontPanelResetStatus" : Col = Col + 1 XL.Cells(Row,Col).Value = "InfraredSupported" : Col = Col + 1 XL.Cells(Row,Col).Value = "InitialLoadInfo" : Col = Col + 1 XL.Cells(Row,Col).Value = "InstallDate" : Col = Col + 1 XL.Cells(Row,Col).Value = "KeyboardPasswordStatus" : Col = Col + 1 XL.Cells(Row,Col).Value = "LastLoadInfo" : Col = Col + 1 XL.Cells(Row,Col).Value = "Manufacturer" : Col = Col + 1 XL.Cells(Row,Col).Value = "Model" : Col = Col + 1 XL.Cells(Row,Col).Value = "Name" : Col = Col + 1 XL.Cells(Row,Col).Value = "NameFormat" : Col = Col + 1 XL.Cells(Row,Col).Value = "NetworkServerModeEnabled" : Col = Col + 1 XL.Cells(Row,Col).Value = "NumberOfProcessors" : Col = Col + 1 XL.Cells(Row,Col).Value = "OEMLogoBitmap" : Col = Col + 1 XL.Cells(Row,Col).Value = "OEMStringArray" : Col = Col + 1 XL.Cells(Row,Col).Value = "PauseAfterReset" : Col = Col + 1 XL.Cells(Row,Col).Value = "PowerManagementCapabilities" : Col = Col + 1 XL.Cells(Row,Col).Value = "PowerManagementSupported" : Col = Col + 1 XL.Cells(Row,Col).Value = "PowerOnPasswordStatus" : Col = Col + 1 XL.Cells(Row,Col).Value = "PowerState" : Col = Col + 1 XL.Cells(Row,Col).Value = "PowerSupplyState" : Col = Col + 1 XL.Cells(Row,Col).Value = "PrimaryOwnerContact" : Col = Col + 1 XL.Cells(Row,Col).Value = "PrimaryOwnerName" : Col = Col + 1 XL.Cells(Row,Col).Value = "ResetCapability" : Col = Col + 1 XL.Cells(Row,Col).Value = "ResetCount" : Col = Col + 1 XL.Cells(Row,Col).Value = "ResetLimit" : Col = Col + 1 XL.Cells(Row,Col).Value = "Status" : Col = Col + 1 XL.Cells(Row,Col).Value = "SupportContactDescription" : Col = Col + 1 XL.Cells(Row,Col).Value = "SystemStartupDelay" : Col = Col + 1 XL.Cells(Row,Col).Value = "SystemStartupOptions" : Col = Col + 1 XL.Cells(Row,Col).Value = "SystemStartupSetting" : Col = Col + 1 XL.Cells(Row,Col).Value = "SystemType" : Col = Col + 1 XL.Cells(Row,Col).Value = "ThermalState" : Col = Col + 1 XL.Cells(Row,Col).Value = "TotalPhysicalMemory MB" : Col = Col + 1 XL.Cells(Row,Col).Value = "UserName" : Col = Col + 1 XL.Cells(Row,Col).Value = "WakeUpType" : Col = Col + 1 XL.Cells(Row,Col).Value = "Workgroup" : Col = Col + 1 XL.Cells(Row,Col).Value = "NumberOfLogicalProcessors" : Col = Col + 1 XL.Cells(Row,Col).Value = "PCSystemType" Row = Row + 1 Col = 1 For Each objItem in colItems XL.Cells(Row,Col).Value = objItem.AdminPasswordStatus : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.AutomaticResetBootOption : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.AutomaticResetCapability : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.BootOptionOnLimit : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.BootOptionOnWatchDog : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.BootROMSupported : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.BootupState : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Caption : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.ChassisBootupState : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.CreationClassName : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.CurrentTimeZone : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.DaylightInEffect : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Description : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Domain : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.DomainRole : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.FrontPanelResetStatus : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.InfraredSupported : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.InitialLoadInfo : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.InstallDate : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.KeyboardPasswordStatus : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.LastLoadInfo : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Manufacturer : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Model : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Name : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.NameFormat : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.NetworkServerModeEnabled : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.NumberOfProcessors : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.OEMLogoBitmap : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.OEMStringArray : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PauseAfterReset : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PowerManagementCapabilities : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PowerManagementSupported : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PowerOnPasswordStatus : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PowerState : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PowerSupplyState : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PrimaryOwnerContact : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.PrimaryOwnerName : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.ResetCapability : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.ResetCount : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.ResetLimit : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Status : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.SupportContactDescription : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.SystemStartupDelay : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.SystemStartupOptions : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.SystemStartupSetting : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.SystemType : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.ThermalState : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.TotalPhysicalMemory / (1024*1024) : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.UserName : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.WakeUpType : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.Workgroup : Col = Col + 1 XL.Cells(Row,Col).Value = objItem.NumberOfLogicalProcessors : Col = Col + 1 XL.Cells(Row,Col).Value = PcsysType(objItem.PCSystemType) Row = Row + 1 Col = 1 Next ' ******* BEGIN CALLOUT A ******* Row = 1 XL.Cells.EntireColumn.AutoFit Set colItems = nothing XL.Rows("2:2").Select XL.ActiveWindow.FreezePanes = True XL.Range("A2").Select ' ******* END CALLOUT A ******* End Sub 3