Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- @REM - Original Message: https://www.reddit.com/r/Batch/comments/1goxbdr/simple_computer_info_tool_i_made_a_while_ago/
- setlocal
- title Friendly System Information Tool :)
- color 0A
- :PleaseNote
- ::: This script relies on the CCALC.EXE utility for returning drive sizes
- ::: in MB. You can find it below:
- :::
- ::: CCALC.EXE - https://www.majorgeeks.com/files/details/brainwave_ccalc.html
- :::
- :MainMenu
- cls
- echo =====================================================
- echo :) :) FRIENDLY SYSTEM INFORMATION TOOL :) :)
- echo -----------------------------------------------------
- echo What would you like to know? Select by number:
- echo:
- echo - 1. CPU - 4. RAM - 7. DISK
- echo - 2. GPU - 5. OS - 8. BIOS
- echo - 3. BOOT TIME - 6. NETWORK - 9. ALL (for full report)
- echo:
- echo - 0. EXIT this FSIT application
- echo -----------------------------------------------------
- echo:
- echo Current ErrorLevel = %errorlevel%
- rem Prompt user for choice
- CHOICE /C 1234567890 /N /M "Your Choice (by number): "
- if errorlevel 10 goto :ExitBatch
- if errorlevel 9 call :getAllInfo
- if errorlevel 8 call :getBIOS
- if errorlevel 7 call :getDisk
- if errorlevel 6 call :getNetwork
- if errorlevel 5 call :getOS
- if errorlevel 4 call :getRAM
- if errorlevel 3 call :getBootTime
- if errorlevel 2 call :getGPU
- if errorlevel 1 call :getCPU
- goto :MainMenu
- :getGPU
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) GPU INFORMATION :)
- echo -----------------------------------------------------
- wmic path win32_videocontroller get name, driverversion
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getCPU
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) CPU INFORMATION :)
- echo -----------------------------------------------------
- wmic cpu get name, maxclockspeed, numberofcores, numberoflogicalprocessors
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getRAM
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) RAM INFORMATION :)
- echo -----------------------------------------------------
- systeminfo | findstr /C:"Total Physical Memory" /C:"Available Physical Memory"
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getDisk
- if "%~1"=="" cls
- setlocal EnableDelayedExpansion
- echo -----------------------------------------------------
- echo :) DISK SPACE INFORMATION :)
- echo -----------------------------------------------------
- for /f "tokens=1-3 delims= " %%A in ('wmic logicaldisk where "drivetype=3" get DeviceID^, Size^, FreeSpace ^| find ":"') do (
- call :CalcMB TotalSpace %%C
- call :CalcMB FreeSpace %%B
- echo Drive %%A - Total: !TotalSpace! MB, Free: !FreeSpace! MB
- )
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- endlocal
- goto :EOF
- :getOS
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) OPERATING SYSTEM INFO :)
- echo -----------------------------------------------------
- systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getBIOS
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) BIOS INFORMATION :)
- echo -----------------------------------------------------
- wmic bios get name, version, serialnumber
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getBootTime
- if "%~1"=="" cls
- echo -----------------------------------------------------
- echo :) LAST SYSTEM BOOT TIME :)
- echo -----------------------------------------------------
- wmic os get lastbootuptime | findstr /B /C:"2"
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getNetwork
- if "%~1"=="" cls & echo Current ErrorLevel = %errorlevel%
- echo -----------------------------------------------------
- echo :) NETWORK CONFIGURATION :)
- echo -----------------------------------------------------
- ipconfig | findstr /C:"IPv4 Address" /C:"Default Gateway" /C:"Subnet Mask"
- echo:
- echo MAC Address:
- wmic nic where "netenabled=true" get name, macaddress
- echo:
- if "%~1"=="" (
- echo Press any key to go back to the main menu.
- pause >nul
- )
- goto :EOF
- :getAllInfo
- if "%~1"=="" cls
- echo =====================================================
- echo :) FULL SYSTEM INFORMATION REPORT :)
- echo =====================================================
- echo:
- call :getGPU NoPause
- call :getCPU NoPause
- call :getRAM NoPause
- call :getDisk NoPause
- call :getOS NoPause
- call :getBIOS NoPause
- call :getBootTime NoPause
- call :getNetwork NoPause
- echo :)
- echo Thanks for using the tool! Press any key to return to the main menu.
- pause >nul
- goto :MainMenu
- :CalcMB - %1 = Variable name; %2 = Number of divide by 1048576 (1MB)
- if "%~1"=="" goto :EOF
- if "%~2"=="" goto :EOF
- for /f %%Z in ('CCALC %~2 / 1048576 /F "#,###" 2^>NUL') do set %~1=%%~Z
- timeout 0 >nul
- goto :EOF
- :ExitBatch
- echo Thanks for using the FSIT!
- exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement