Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::Gather System Status Via Batch ::
- ::Created by RU$$ [http://russdev.mooo.com/] ::
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- @ECHO OFF
- @setlocal enabledelayedexpansion
- @SET NUM=1
- @COLOR 02
- @TITLE --Gather System Status--
- Echo Checking System Status...
- Echo -------------------------------------------------------------------------------
- :: Check administrator status
- net user "%username%" | findstr /C:"*Administrators">nul && (
- Set "AD=Administrator"
- ) || (
- Set "AD=Guest"
- )
- Echo Current Privlage Status: [%AD%]
- :: Get firewall status
- for /f "tokens=1,2" %%a in ('netsh advfirewall show allprofiles state^| find /i "State"') DO (
- If "!NUM!"=="1" (
- Set "Domain=%%b"
- )
- If "!NUM!"=="2" (
- Set "Private=%%b"
- )
- If "!NUM!"=="3" (
- Set "Public=%%b"
- )
- set /a NUM=!NUM! + 1)
- Echo Network Firewall Status: [Domain: %Domain%] - [Private: %Private%] - [Public: %Public%]
- :: Get windows update status
- set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
- set VALUE_NAME=AUOptions
- FOR /F "usebackq skip=2 tokens=1-4" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
- set ValueValue=%%C %%D
- )
- If "%ValueValue%"=="0x1 " (
- Set "WUpdate=[WARNING: Never check for updates]"
- )
- If "%ValueValue%"=="0x2 " (
- Set "WUpdate=[Check for updates - choose whether to download ^& install]"
- )
- If "%ValueValue%"=="0x3 " (
- Set "WUpdate=[Download updates - choose whether to install]"
- )
- If "%ValueValue%"=="0x4 " (
- Set "WUpdate=[Install updates automaticly]"
- )
- Echo Windows Update Status: %WUpdate%
- :: Get antivirus info
- set num=1
- for /f "tokens=2 skip=2 delims=^=" %%a in ('WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List') DO (
- If "!NUM!"=="1" (
- Set "A1=%%a"
- )
- If "!NUM!"=="2" (
- Set "A2=%%a"
- )
- set /a NUM=!NUM! + 1)
- Echo Virus/Spyware Protection Status: [%A1%] [%A2%]
- :: Get UAC status.
- for /f "tokens=3" %%a in ('REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /v EnableLUA') DO (
- If "%%a"=="0x1" (
- Set "ST=Enabled"
- )
- If "%%a"=="0x0" (
- Set "ST=Disabled"
- ))
- Echo Windows UAC Status: [%ST%]
- :: Get smartscreen status
- for /f "tokens=3" %%a in ('REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ /v SmartScreenEnabled') DO (
- If "%%a"=="Off" (
- Set "SC=Disabled"
- )
- If "%%a"=="0x0" (
- Set "SC=Enabled"
- ))
- Echo Windows SmartScreen Status: [%SC%]
- :: Get network access protection status
- for /f "tokens=3" %%a in ('REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\napagent\ /v Start') DO (
- If "%%a"=="0x2" (
- Set "SS=Automatic"
- )
- If "%%a"=="0x3" (
- Set "SS=Manual/Off"
- )
- If "%%a"=="0x4" (
- Set "SS=Disabled"
- )
- If "%%a"=="0x2" (
- Set "SS=Automatic (Delayed Start)"
- ))
- Echo Network Access Protection Status: [%SS%]
- :: Get Microsoft Account status:
- for /f "tokens=*" %%a in ('echo %logonserver%') DO (
- If "%%a"=="\\MicrosoftAccount" (Set "AC=Microsoft Account Connected") else (Set "AC=No Microsoft Account Found - Local Account")
- )
- Echo Microsoft Account Status: [%AC%]
- :: Get auto maintenance status
- for /f "tokens=3" %%a in ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v ReportedState') DO (
- If "%%a"=="0x1" (Set "WM=Enabled") ELSE (Set "WM=Disabled")
- )
- Echo System Maintenance Status: [%WM%]
- :: Home group status
- for /f "tokens=3" %%a in ('REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HomeGroupListener\ /v Start') DO (
- If "%%a"=="0x2" (
- Set "HG=Automatic"
- )
- If "%%a"=="0x3" (
- Set "HG=Manual/Off"
- )
- If "%%a"=="0x4" (
- Set "HG=Disabled"
- ))
- Echo Windows HomeGroup Status: [%HG%]
- :: Home group status
- for /f "tokens=3" %%a in ('REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\fhsvc\ /v Start') DO (
- If "%%a"=="0x2" (
- Set "FH=Automatic"
- )
- If "%%a"=="0x3" (
- Set "FH=Manual/Off"
- )
- If "%%a"=="0x4" (
- Set "FH=Disabled"
- ))
- Echo FileHistory Status: [%FH%]
- Echo -------------------------------------------------------------------------------
- Echo(
- setlocal disabledelayedexpansion
- Echo System Scan Complete!
- pause >nul
- goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement