- @echo off
- :: Check if running with administrator privileges
- echo This script requires administrative privileges. Elevating...
- powershell -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
- exit /b
- )
- :: Keep Windows awake
- :: Code below will run with admin privilages
- echo Admin privileges acquired.
- echo.
- echo Starting quick Antivirus Scan
- echo.
- "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 1 -Trace
- echo.
- "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Remove -All
- echo Starting system Scan
- echo.
- echo DISM-ing the system
- echo.
- DISM.exe /Online /Cleanup-image /Restorehealth
- echo.
- echo SFC-ing the system
- echo.
- SFC /Scannow
- echo.
- echo System scan done
- echo.
- echo Rebooting the system
- shutdown -r -t 1
Recent Pastes