You can always use the systeminfo command, but then you have to go through the short boot screen
set totalMem= set availableMem= set usedMem= REM You need to make a loop for /f "tokens=4" %%a in ('systeminfo ^| findstr Physical') do if defined totalMem (set availableMem=%%a) else (set totalMem=%%a) set totalMem=%totalMem:,=% set availableMem=%availableMem:,=% set /a usedMem=totalMem-availableMem Echo Total Memory: %totalMem% Echo Used Memory: %usedMem%
And that should do exactly what you want. This code can be easily changed to display virtual memory. (Using set totalMem=%totalMem:,=% and set availableMem=%availableMem:,=% eliminates commas in variables.)
Mona
source share