Results 1 to 12 of 12

Thread: Registry Settings

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15

    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.
    Last edited by Nquizitive; March 29th, 2006 at 23:04 PM.
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  2. #2
    Super Moderator Super Moderator Big Booger's Avatar
    Join Date
    Apr 2002
    Location
    JAPAN
    Posts
    10,201
    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.

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    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!
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  4. #4
    Head Honcho Administrator Reverend's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    14,737
    System BIOS and Video BIOS:

    HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System

    =========== Please Read The Forum Rules ===========

  5. #5
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    Thanks reverend.
    I overlooked that one.
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  6. #6
    Bronze Member
    Join Date
    Dec 2005
    Posts
    175
    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

  7. #7
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    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.
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  8. #8
    Bronze Member
    Join Date
    Dec 2005
    Posts
    175
    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

  9. #9
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    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.
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  10. #10
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    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?
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

  11. #11
    Bronze Member
    Join Date
    Dec 2005
    Posts
    175
    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

    Last edited by Kane; April 12th, 2006 at 16:51 PM.

  12. #12
    Junior Member
    Join Date
    Mar 2006
    Location
    In Texas.
    Posts
    15
    Thanks again, Kane. You're tops in my book.
    Just remember love is life
    And hate is living death
    Treat your life for what it's worth
    And live for every breath

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •