get only the numbers of ram installed in html file


  1. Posts : 22
    Windows 10
       #1

    get only the numbers of ram installed in html file


    Good guys, I have a following doubt which is. How can we export via html with a batch file script the following SYSTEMINFO command from the ram installed on my PC? But without mentioning it in the html written "TOTAL PHISICAL MEMORY: 16 267 MB"? I just want to get only the numbers of the ram installed in the html file. Can you help me?
      My Computer


  2. Posts : 6,968
    windows 10
       #2

    Use CPU-Z | Softwares | CPUID it tells you all about the ram speed etcas well as cpu and at the bottom is an option to write it to a html file
      My Computer


  3. Posts : 22
    Windows 10
    Thread Starter
       #3

    Thank you, but I really wanted only the information from the installed ram and not through these programs that you mentioned. Via the Windows command line.
      My Computer


  4. Posts : 3,128
    Win10
       #4

    Using guidance from :
    Windows Batch System Info to HTML - Stack Overflow

    Test create a batch file along these lines
    1 find the string of interest from systeminfo command

    2 remove all extra text and blanks; then replace comma with space if you want (ie if you don't want thousand separator); and remove MB

    3 build simple html (build Ram_sysinfo.html in same dir as the batch file)

    Code:
    :: get Total Physical Memory text from runing systeminfo and build simple html
    for /f "usebackq delims=" %%I in (`systeminfo ^| findstr /B /C:"Total Physical Memory:"`) do set tot_ram=%%I && echo %%I
    
    Set tot_ram=%tot_ram:Total Physical Memory:=%
    Set tot_ram=%tot_ram: =%
    Set tot_ram=%tot_ram:,= %
    Set tot_ram=%tot_ram:MB=%
    
    @echo off
    (
    echo ^<HTML^> 
    echo ^<BODY^> 
    echo ^<pre^> 
    echo %tot_ram%
    echo ^</pre^> 
    echo ^</BODY^> 
    echo ^</HTML^>
    )>Ram_sysinfo.html
    
    pause
    exit
    You'll have to adjust the batch file contents to suit your own requirements ( I don't have enough knowhow to construct stylized html ).
      My Computers


  5. Posts : 22
    Windows 10
    Thread Starter
       #5

    Das10, thank you very much, mate, that's what I needed.
      My Computer


  6. Posts : 16,139
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #6

    Hello @Underthaker,

    If you do require to occasionally output system information, I have written a batch script that generates certain criteria of system information.

    It can be found here . . .

    [1] Goto this TenForums link => Batch Scripts / Programs.
    [2] Goto the heading System Reports . . .
    [3] Download and Run the .bat file.

    I hope this helps!
      My Computer


  7. Posts : 39,994
    windows 10 professional version 1607 build 14393.969 64 bit
       #7

    These are command prompt or powershell commands to view information on the installed RAM, DIMM, etc.

    Code:
    wmic memorychip get banklabel, manufacturer, partnumber, speed, MemoryType, devicelocator
    Code:
    [Cmdletbinding()]
    Param(
        [string]$Computername = "localhost"
    )
    cls
    $PysicalMemory = Get-WmiObject -class "win32_physicalmemory" -namespace "root\CIMV2" -ComputerName $Computername
    
    Write-Host "Memore Modules:" -ForegroundColor Green
    $PysicalMemory | Format-Table Tag,BankLabel,@{n="Capacity(GB)";e={$_.Capacity/1GB}},Manufacturer,PartNumber,Speed -AutoSize
    
    Write-Host "Total Memory:" -ForegroundColor Green
    Write-Host "$((($PysicalMemory).Capacity | Measure-Object -Sum).Sum/1GB)GB"
    
    $TotalSlots = ((Get-WmiObject -Class "win32_PhysicalMemoryArray" -namespace "root\CIMV2" -ComputerName $Computername).MemoryDevices | Measure-Object -Sum).Sum
    Write-Host "`nTotal Memory Slots:" -ForegroundColor Green
    Write-Host $TotalSlots
    
    $UsedSlots = (($PysicalMemory) | Measure-Object).Count 
    Write-Host "`nUsed Memory Slots:" -ForegroundColor Green
    Write-Host $UsedSlots
    
    If($UsedSlots -eq $TotalSlots)
    {
        Write-Host "All memory slots are filled up, none is empty!" -ForegroundColor Yellow
    }
    Code:
    wmic memorychip list full
    Code:
    Get-WmiObject Win32_PhysicalMemory

    This is software to view RAM utilization;
    https://docs.microsoft.com/en-us/sys...wnloads/rammap
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Đ Designer Media Ltd
All times are GMT -5. The time now is 00:18.
Find Us




Windows 10 Forums