by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Thu 29th July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get the Physical Memory Details using Win32_PhysicalMemory WMI Class
'Generated using 'WMI Win32 Class Autoscript Generator' - Developed by Karthikeyan
'Homepage: http://www.geocities.com/marskarthik
On Error Resume Next
Computer = "."
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSystem.OpenTextFile ("c:\Win32_PhysicalMemory.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_PhysicalMemory Class by Karthikeyan"
TextFile.WriteLine
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
TextFile.WriteLine "BankLabel: " & SubItems.BankLabel
TextFile.WriteLine "Capacity: " & SubItems.Capacity
TextFile.WriteLine "Caption: " & SubItems.Caption
TextFile.WriteLine "CreationClassName: " & SubItems.CreationClassName
TextFile.WriteLine "DataWidth: " & SubItems.DataWidth
TextFile.WriteLine "Description: " & SubItems.Description
TextFile.WriteLine "DeviceLocator: " & SubItems.DeviceLocator
TextFile.WriteLine "FormFactor: " & SubItems.FormFactor
TextFile.WriteLine "HotSwappable: " & SubItems.HotSwappable
TextFile.WriteLine "InstallDate: " & SubItems.InstallDate
TextFile.WriteLine "InterleaveDataDepth: " & SubItems.InterleaveDataDepth
TextFile.WriteLine "InterleavePosition: " & SubItems.InterleavePosition
TextFile.WriteLine "Manufacturer: " & SubItems.Manufacturer
TextFile.WriteLine "MemoryType: " & SubItems.MemoryType
TextFile.WriteLine "Model: " & SubItems.Model
TextFile.WriteLine "Name: " & SubItems.Name
TextFile.WriteLine "OtherIdentifyingInfo: " & SubItems.OtherIdentifyingInfo
TextFile.WriteLine "PartNumber: " & SubItems.PartNumber
TextFile.WriteLine "PositionInRow: " & SubItems.PositionInRow
TextFile.WriteLine "PoweredOn: " & SubItems.PoweredOn
TextFile.WriteLine "Removable: " & SubItems.Removable
TextFile.WriteLine "Replaceable: " & SubItems.Replaceable
TextFile.WriteLine "SerialNumber: " & SubItems.SerialNumber
TextFile.WriteLine "SKU: " & SubItems.SKU
TextFile.WriteLine "Speed: " & SubItems.Speed
TextFile.WriteLine "Status: " & SubItems.Status
TextFile.WriteLine "Tag: " & SubItems.Tag
TextFile.WriteLine "TotalWidth: " & SubItems.TotalWidth
TextFile.WriteLine "TypeDetail: " & SubItems.TypeDetail
TextFile.WriteLine "Version: " & SubItems.Version
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_PhysicalMemory.txt",1,True
No comments have been posted about Get the Physical Memory Details using Win32_PhysicalMemory WMI Class. Why not be the first to post a comment about Get the Physical Memory Details using Win32_PhysicalMemory WMI Class.