-
Registry Settings
I have a question I hope someone can answer.
Where can I find detailed hardware information in XP?
More pointedly how much RAM is installed on a system through the registry.
I am researching registry settings for a possible personal project, and have found entries for the processor, video adapter, computer name, etc. I cannot figure out the memory or the mobo entries. Does anyone have any ideas?
Any help would be gretly appreciated. :)
-
HKEY_LOCAL_MACHINE\HARDWARE\RESOURCEMAP\System Resources\Physical Memory
I believe that refers to memory, however, it provides no useful information.
http://www.sysinternals.com/Utilities/PsInfo.html
that tool however does... and how it discovers this, I have no idea.
-
Thanks Booger.
I have been using Psinfo, and this is the basis for my inquiry. I have found the physical memory key, and no it provides no useful information. I guess I was hoping someone may know of another key, or if that binary number may provide some clue as to installed memory. I have tried extracting that number, but it is too long to read in regedit. Is there someway of maybe accessing the system BIOS through the registry? If other applications can get this info from a machine, I know there's a way. I just need some help finding it. Thanks again, and have a good day!
-
System BIOS and Video BIOS:
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System
-
Thanks reverend.
I overlooked that one.
-
Or use WMI/vbscript:
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colSettings
Wscript.Echo "OS Name: " & objOperatingSystem.Name
Wscript.Echo "Version: " & objOperatingSystem.Version
Wscript.Echo "Service Pack: " & _
objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Wscript.Echo "OS Manufacturer: " & objOperatingSystem.Manufacturer
Wscript.Echo "Windows Directory: " & _
objOperatingSystem.WindowsDirectory
Wscript.Echo "Locale: " & objOperatingSystem.Locale
Wscript.Echo "Available Physical Memory: " & _
objOperatingSystem.FreePhysicalMemory
Wscript.Echo "Total Virtual Memory: " & _
objOperatingSystem.TotalVirtualMemorySize
Wscript.Echo "Available Virtual Memory: " & _
objOperatingSystem.FreeVirtualMemory
Wscript.Echo "Size stored in paging files: " & _
objOperatingSystem.SizeStoredInPagingFiles
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
Wscript.Echo "System Name: " & objComputer.Name
Wscript.Echo "System Manufacturer: " & objComputer.Manufacturer
Wscript.Echo "System Model: " & objComputer.Model
Wscript.Echo "Time Zone: " & objComputer.CurrentTimeZone
Wscript.Echo "Total Physical Memory: " & _
objComputer.TotalPhysicalMemory
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_Processor")
For Each objProcessor in colSettings
Wscript.Echo "System Type: " & objProcessor.Architecture
Wscript.Echo "Processor: " & objProcessor.Description
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_BIOS")
For Each objBIOS in colSettings
Wscript.Echo "BIOS Version: " & objBIOS.Version
Next
-
I appreciate the VB code, Kane, but I know absolutely nothing about VB.
I am familiar with executing rundll for opening system applets (that's about it). i'm really curious about the location of system information and how to access it through the OS.
-
Hi Nquizitive,
Copy the code notepad and save the file with .vbs extension (e.g. systeminfo.vbs) then double-click file to execute the script.
The script uses WMI to query the machine for system information. When you execute the script it performs following steps:
1. Connect to the WMI service
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
2. Retrieve Instances of WMI managed Resources
Code:
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
3. Echo the value of properties
Code:
Wscript.Echo "OS Name: " & objOperatingSystem.Name
Wscript.Echo "Version: " & objOperatingSystem.Version
Wscript.Echo "Service Pack: " & _
objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Wscript.Echo "OS Manufacturer: " & objOperatingSystem.Manufacturer
Wscript.Echo "Windows Directory: " & _
objOperatingSystem.WindowsDirectory
Wscript.Echo "Locale: " & objOperatingSystem.Locale
Wscript.Echo "Available Physical Memory: " & _
objOperatingSystem.FreePhysicalMemory
Wscript.Echo "Total Virtual Memory: " & _
objOperatingSystem.TotalVirtualMemorySize
Wscript.Echo "Available Virtual Memory: " & _
objOperatingSystem.FreeVirtualMemory
Wscript.Echo "Size stored in paging files: " & _
objOperatingSystem.SizeStoredInPagingFiles
Using WMI you can query a wide variety of system information. Check out these scripts
http://www.microsoft.com/technet/scr...e/default.mspx
-
Hey, Thanks a million, Kane. I have always been turned off of vb, mainly because i don't comprehend the way microsoft explains and implements things. I also was under the assumption that you needed to compile vb code.
You just piqued my interest in this WMI scripting. THANK YOU, THANK YOU, THANK YOU.
-
Hey Kane,
One more two questions. I was browsing the scripts on this site, and decided to try to one like the one above, but It doesn't run. What are some other ways to get these scripts executing? Do you know of a good online resource to learn WMI?
-
VBScript is derived from Visual Basic. Unlike Visual Basic or VBA, VBScripts can not be compiled prior to their execution....
Microsoft offers three hosts for running script code - Internet Explorer, Internet Information Server (IIS),Windows Script Host (WSH). By default, WSH associate WScript.exe (the graphical version of the WSH) with the scripting extensions (.vbs .vbe .js .jse .wsf) so double-clicking a .vbs file will normally execute WScript.exe which then execute the double-clicked script. WSH consists of one other executable, Cscript.exe, which is used to execute scripts on a command line.
To run the script in command line mode, start CMD and type the following command…
cscript [script name]
script name is the name of the script file, including the file name extension and any necessary path information.
Microsoft Windows 2000 Scripting Guide is an excellent resource to learn VBScript, WSH and WMI.
http://www.microsoft.com/technet/scr..._overview.mspx
WMI Scripting tutorial
http://msdn.microsoft.com/library/en...ng06112002.asp
:)
-
Thanks again, Kane. You're tops in my book.