How to get the current CPU usage and available memory in batch file?
I am creating a simple script that outputs the current user logged in, CPU usage for the current system and the available memory? I have managed to get the current user/s logged on but is it possible to get the cpu usage and memory as well? This is my code so far. @echo off for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set USER=%%i) 2>&1 echo "Logged On User: %USER%" echo. pause To get the cpu usage i have tried this command but it doesn't seem to be working. for /f "skip=1" %p in ('wmic cpu get loadpercentage') do echo %p% Monacraft You could always utilise the systeminfo command,