's = window.navigator.appname 'if(s = "Microsoft Internet Explorer") then ' MsgBox(s) 'else ' document.location.href = "MemoryScanner.php"; 'end if 'find browser type strComputer = "." Function GetWMIServices() Set GetWMIServices = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") End Function Function WMIDateStringToDate(dtmWMIDate) If Not IsNull(dtmWMIDate) Then WMIDateStringToDate = CDate(Mid(dtmWMIDate, 5, 2) & "/" & _ Mid(dtmWMIDate, 7, 2) & "/" & Left(dtmWMIDate, 4) & _ " " & Mid (dtmWMIDate, 9, 2) & ":" & _ Mid(dtmWMIDate, 11, 2) & ":" & Mid(dtmWMIDate, _ 13, 2)) End If End Function Function DisplayOutput(strOutput) 'document.all.divOutput.innerHTML = strOutput 'document.Write(strOutput) 'document.all.tdnew.innerHTML=strOutput End Function Function GetTableHeader() str = "" str = str & "" str = str & "" & vbCRLF GetTableHeader = str End Function Function GetTableFooter() str = "" & vbCRLF & "
PropertyValue
" & vbCRLF GetTableFooter = str End Function Function GetRow(PropName, PropValue) str = "" str = str & "" & PropName & "" str = str & "" & PropValue & "" str = str & "" & vbCRLF GetRow = str End Function Function calculateMemory(memvar) if memvar/(1024*1024*1024) >=1 then res = round(memvar/(1024*1024*1024)) & "GB" else if memvar/ (1024*1024) >=1 then res = round(memvar/ (1024*1024)) & "MB" else res = round(memvar/1024) & "KB" end if end if calculateMemory = res End Function Function calculateMaxMemory(memvar) if memvar/(1024*1024) >=1 then res = round(memvar/(1024*1024)) & "GB" else if memvar/ (1024) >=1 then res = round(memvar/ (1024)) & "MB" end if end if calculateMaxMemory = res End Function Function ShowSystemInformation() 'On Error Resume Next str = "" Set objWMIService = GetWMIServices() Set colSettings = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") Set SerialNo = objWMIService.ExecQuery("Select * from Win32_BIOS") Set colSettings1 = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True") str = str & "

Computer systems

" & vbCRLF For Each objComputer in colSettings str = str & GetTableHeader() document.f1.SystemName.value = objComputer.Name document.f1.SystemManufacturer.value=objComputer.Manufacturer str = str & GetRow("System Name", objComputer.Name) str = str & GetRow("System Manufacturer", objComputer.Manufacturer) str = str & GetRow("System Model", objComputer.Model) str = str & GetRow("Total Physical Memory", objComputer.TotalPhysicalMemory) document.f1.SystemModel.value= objComputer.Model document.f1.TotalPhysicalMemory.value=calculateMemory(objComputer.TotalPhysicalMemory) For Each objSystemSerialNo in SerialNo str = str & GetRow("Serial No", objSystemSerialNo.SerialNumber) document.f1.SerialNo.value=objSystemSerialNo.SerialNumber Next For Each oItem in colSettings1 for each propValue in oItem.IPAddress str = str & GetRow("System IP Address",propValue) document.f1.SystemIPAddress.value=propValue next Next str = str & GetTableFooter() Next Set colSettings = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory", , 48) Set colComputer = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") str = str & "

Memory Details

" & vbCRLF ' slots = "" totalmemory=0 installedMemory ="" For Each objItem in colSettings str = str & GetTableHeader() str = str & GetRow("Maximum Memory Capacity", objItem.MaxCapacity) document.f1.Capacity.value=calculateMaxMemory(objItem.MaxCapacity) str = str & GetRow("Memory Slots ",objItem.MemoryDevices) document.f1.MemorySlots.value=objItem.MemoryDevices For Each objMemConfig in colItems banks =banks & objMemConfig.BankLabel & "-" document.f1.BankLabel.value=banks str = str & GetRow("Bank Label", objMemConfig.BankLabel) str = str & GetRow("Installed Memory", objMemConfig.Capacity) totalmemory = totalmemory + (objMemConfig.Capacity) installedMemory = installedMemory & calculateMemory(objMemConfig.Capacity) & "," Next For Each objComputerSys in colComputer str = str & GetRow("Currently Installed Memory",objComputerSys.TotalPhysicalMemory) Next str = str & GetTableFooter() Next Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory", , 48) str = str & "

Memory Configuration

" & vbCRLF For Each objItem in colItems str = str & GetTableHeader() str = str & GetRow("Bank Label", objItem.BankLabel) 'document.f1.BankLabel.value=objItem.BankLabel str = str & GetRow("Capacity", objItem.Capacity) document.f1.MemoryDataWidth.value=objItem.DataWidth str = str & GetRow("Data Width", objItem.DataWidth) document.f1.Description.value=objItem.Description str = str & GetRow("Description", objItem.Description) document.f1.DeviceLocator.value=objItem.DeviceLocator str = str & GetRow("Device Locator", objItem.DeviceLocator) document.f1.FormFactor.value=objItem.FormFactor str = str & GetRow("Form Factor", objItem.FormFactor) document.f1.HotSwappable.value=objItem.HotSwappable str = str & GetRow("Hot Swappable", objItem.HotSwappable) document.f1.MemoryManufacturer.value=objItem.Manufacturer str = str & GetRow("Manufacturer", objItem.Manufacturer) document.f1.MemoryType.value=objItem.MemoryType str = str & GetRow("Memory Type", objItem.MemoryType) document.f1.Name.value=objItem.Name document.f1.PartNumber.value=objItem.PartNumber document.f1.PositionInRow.value=objItem.PositionInRow document.f1.MemorySpeed.value=objItem.Speed document.f1.Tag.value=objItem.Tag document.f1.TypeDetail.value=objItem.TypeDetail str = str & GetRow("Name", objItem.Name) str = str & GetRow("Part Number", objItem.PartNumber) str = str & GetRow("Position In Row", objItem.PositionInRow) str = str & GetRow("Speed", objItem.Speed) str = str & GetRow("Tag", objItem.Tag) str = str & GetRow("Type Detail", objItem.TypeDetail) str = str & GetTableFooter() Next Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor") str = str & "

CPU Configuration

" & vbCRLF For Each objItem in colItems str = str & GetTableHeader() document.f1.CPUManufacturer.value=objItem.Manufacturer document.f1.CPUName.value=objItem.Name document.f1.ProcessorId.value=objItem.ProcessorId document.f1.ProcessorType.value=objItem.ProcessorType document.f1.AddressWidth.value=objItem.AddressWidth document.f1.Architecture.value=objItem.Architecture document.f1.Availability.value=objItem.Availability document.f1.CPUStatus.value=objItem.CpuStatus document.f1.CPUSpeed.value=objItem.CurrentClockSpeed document.f1.CPUDataWidth.value=objItem.DataWidth document.f1.CPUDescription.value=objItem.Description document.f1.DeviceID.value=objItem.DeviceID document.f1.ExtClock.value=objItem.ExtClock document.f1.L2CacheSize.value=objItem.L2CacheSize document.f1.L2CacheSpeed.value=objItem.L2CacheSpeed document.f1.Level.value=objItem.Level document.f1.LoadPercentage.value=objItem.LoadPercentage document.f1.MaximumClockSpeed.value=objItem.MaxClockSpeed document.f1.Revision.value=objItem.Revision document.f1.Role.value=objItem.Role document.f1.SocketDesignation.value=objItem.SocketDesignation document.f1.StatusInformation.value=objItem.StatusInfo document.f1.Stepping.value=objItem.Stepping document.f1.UniqueId.value=objItem.UniqueId document.f1.UpgradeMethod.value=objItem.UpgradeMethod document.f1.VoltageCaps.value=objItem.VoltageCaps str = str & GetRow("Manufacturer", objItem.Manufacturer) str = str & GetRow("Name", objItem.Name) str = str & GetRow("Processor Id", objItem.ProcessorId) str = str & GetRow("Processor Type", objItem.ProcessorType) str = str & GetRow("Address Width", objItem.AddressWidth) str = str & GetRow("Architecture", objItem.Architecture) str = str & GetRow("Availability", objItem.Availability) str = str & GetRow("CPU Status", objItem.CpuStatus) str = str & GetRow("Current Clock Speed", objItem.CurrentClockSpeed) str = str & GetRow("Data Width", objItem.DataWidth) str = str & GetRow("Description", objItem.Description) str = str & GetRow("Device ID", objItem.DeviceID) str = str & GetRow("Ext Clock", objItem.ExtClock) document.f1.Family.value=objItem.Family str = str & GetRow("Family", objItem.Family) str = str & GetRow("L2 Cache Size", objItem.L2CacheSize) str = str & GetRow("L2 Cache Speed", objItem.L2CacheSpeed) str = str & GetRow("Level", objItem.Level) str = str & GetRow("Load Percentage", objItem.LoadPercentage) str = str & GetRow("Maximum Clock Speed", objItem.MaxClockSpeed) document.f1.PNPDeviceID.value=objItem.PNPDeviceID str = str & GetRow("PNP Device ID", objItem.PNPDeviceID) str = str & GetRow("Revision", objItem.Revision) str = str & GetRow("Role", objItem.Role) str = str & GetRow("Socket Designation", objItem.SocketDesignation) str = str & GetRow("Status Information", objItem.StatusInfo) str = str & GetRow("Stepping", objItem.Stepping) str = str & GetRow("Unique Id", objItem.UniqueId) str = str & GetRow("Upgrade Method", objItem.UpgradeMethod) str = str & GetRow("Voltage Caps", objItem.VoltageCaps) str = str & GetTableFooter() Next Set colSettings = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") str = str & "

Computer Details

" & vbCRLF For Each objOperatingSystem in colSettings str = str & GetTableHeader() document.f1.OSName.value=objOperatingSystem.Name document.f1.Version.value=objOperatingSystem.Version document.f1.ServicePack.value=objOperatingSystem.ServicePackMajorVersion & "." & objOperatingSystem.ServicePackMinorVersion document.f1.OSManufacturer.value=objOperatingSystem.Manufacturer document.f1.WindowsDirectory.value=objOperatingSystem.WindowsDirectory document.f1.Locale.value=objOperatingSystem.Locale document.f1.AvailablePhysicalMemory.value=calculateMemory(objOperatingSystem.FreePhysicalMemory) document.f1.TotalVirtualMemory.value=calculateMemory(objOperatingSystem.TotalVirtualMemorySize) document.f1.AvailableVirtualMemory.value=calculateMemory(objOperatingSystem.FreeVirtualMemory) str = str & GetRow("OS Name", objOperatingSystem.Name) str = str & GetRow("Version", objOperatingSystem.Version) str = str & GetRow("Service Pack", _ objOperatingSystem.ServicePackMajorVersion & "." & objOperatingSystem.ServicePackMinorVersion) str = str & GetRow("OS Manufacturer", objOperatingSystem.Manufacturer) str = str & GetRow("Windows Directory", objOperatingSystem.WindowsDirectory) str = str & GetRow("Locale", objOperatingSystem.Locale) str = str & GetRow("Available Physical Memory", objOperatingSystem.FreePhysicalMemory) str = str & GetRow("Total Virtual Memory", objOperatingSystem.TotalVirtualMemorySize) str = str & GetRow("Available Virtual Memory", objOperatingSystem.FreeVirtualMemory) str = str & GetTableFooter() Next Set colSettings = objWMIService.ExecQuery("Select * from Win32_Processor") str = str & "

Processors

" & vbCRLF For Each objProcessor in colSettings str = str & GetTableHeader() document.f1.SystemType.value=objProcessor.Architecture document.f1.Processor.value=objProcessor.Description str = str & GetRow("System Type", objProcessor.Architecture) str = str & GetRow("Processor", objProcessor.Description) str = str & GetTableFooter() Next Set colSettings = objWMIService.ExecQuery("Select * from Win32_BIOS") str = str & "

BIOS

" & vbCRLF For Each objBIOS in colSettings str = str & GetTableHeader() document.f1.BIOSVersion.value=objBIOS.Version str = str & GetRow("BIOS Version", objBIOS.Version) str = str & GetTableFooter() Next Set colItems = objWMIService.ExecQuery("Select * from Win32_DisplayConfiguration") str = str & "

Display configuration

" & vbCRLF For Each objItem in colItems str = str & GetTableHeader() document.f1.BitsPerPel.value=objItem.BitsPerPel document.f1.DeviceName.value=objItem.DeviceName document.f1.DisplayFlags.value=objItem.DisplayFlags document.f1.DisplayFrequency.value=objItem.DisplayFrequency document.f1.DriverVersion.value=objItem.DriverVersion document.f1.LogPixels.value=objItem.LogPixels document.f1.PelsHeight.value=objItem.PelsHeight document.f1.PelsWidth.value=objItem.PelsWidth document.f1.SettingID.value=objItem.SettingID document.f1.SpecificationVersion.value=objItem.SpecificationVersion str = str & GetRow("Bits Per Pel", objItem.BitsPerPel) str = str & GetRow("Device Name", objItem.DeviceName) str = str & GetRow("Display Flags", objItem.DisplayFlags) str = str & GetRow("Display Frequency", objItem.DisplayFrequency) str = str & GetRow("Driver Version", objItem.DriverVersion) str = str & GetRow("Log Pixels", objItem.LogPixels) str = str & GetRow("Pels Height", objItem.PelsHeight) str = str & GetRow("Pels Width", objItem.PelsWidth) str = str & GetRow("Setting ID", objItem.SettingID) str = str & GetRow("Specification Version", objItem.SpecificationVersion) str = str & GetTableFooter() Next document.f1.InstalledMemory.value=installedMemory document.f1.CurrentMemory.value=calculateMemory(totalmemory) Set colItems = objWMIService.ExecQuery("Select * from Win32_PCMCIAController") For Each objItem in colItems str = str & GetTableHeader() str = str & GetRow("Configuration Manager Error Code", _ objItem.ConfigManagerErrorCode) str = str & GetRow("Configuration Manager User Configuration", _ objItem.ConfigManagerUserConfig) str = str & GetRow("Device ID", objItem.DeviceID) str = str & GetRow("Manufacturer", objItem.Manufacturer) str = str & GetRow("Name", objItem.Name) str = str & GetRow("PNP Device ID", objItem.PNPDeviceID) str = str & GetRow("Protocol Supported", objItem.ProtocolSupported) str = str & GetTableFooter() Next DisplayOutput(str) End Function