Initializing
Back to Projects
Year2024
DomainFullstack
AccessOpen Source
Complexity0 / 10
WindowsBatch ScriptSystem Maintenance
FullstackArchived

Windows System Maintenance Scripts

A collection of one-line batch scripts for common Windows system maintenance tasks like disk checking, memory optimization, and health restore.

# Windows System Maintenance Scripts

Quick-access batch scripts for common Windows system maintenance tasks.

Scripts Overview

ScriptPurposeRun As Admin?
1.chkdsk.batCheck disk for errorsYes
2.chkdsk f.batFix disk errors automaticallyYes
3.scannow.batRun Windows system file checker (SFC)Yes
4.Restorehealth.batRun DISM to restore system healthYes
5.memoryusage.batCheck memory/ RAM usageNo
6.memoryusage2.batDetailed memory reportNo
7.RAM.batRAM optimization infoNo
8.DynamicTick.batCheck dynamic tick settingNo

Usage

batch
:: Run individually
1.chkdsk.bat
3.scannow.bat

Quick Reference

Disk Errors

batch
:: Check disk
chkdsk

:: Fix errors (schedules on restart)
chkdsk /f

System File Repair

batch
:: Scan and repair Windows files
scannow

:: If SFC fails, restore health
DISM /Online /Cleanup-Image /RestoreHealth

Memory Issues

batch
:: Check current memory usage
systeminfo | findstr /C:"Total Physical Memory" /C:"Available Physical Memory"

:: Clear memory (works lightly)

When to Use

ProblemScript
"Disk error" messages, slow file access1.chkdsk.bat or 2.chkdsk f.bat
System file corruption, crashes3.scannow.bat
Windows won't start, image repair4.Restorehealth.bat
Slow performance, low RAM5.memoryusage.bat
Verify Windows activation(Use W10A.bat in cache_management)

Important Notes

  • Schedule disk checks: chkdsk /f requires restart
  • Run in order: For serious issues: 341
  • Patience: SFC and DISM can take 15-30 minutes
  • Create restore point before major repairs

Architecture Feedback

Spotted a potential optimization or antipattern? Let me know.

Submit a Technical Suggestion