A comprehensive batch script for diagnosing and repairing Windows system issues. This tool provides an interactive menu-driven interface to execute various Windows system maintenance and repair commands.
- Quick Status Check: Rapid system image integrity verification
- Detailed System Scan: In-depth analysis of system image health
- System Image Repair: Automated repair of corrupted system files with Windows Update integration
- System File Checker: Comprehensive system file integrity verification and repair
- Windows Update Repair: Advanced troubleshooting for Windows Update issues including:
- Service management
- Component re-registration
- Network reset
- Driver cleanup
- All-in-One Option: Sequential execution of all repair operations
- Interactive Menu: User-friendly interface with detailed help section
- Windows Operating System (Windows 10/11 recommended)
- Administrator privileges
- Active internet connection (for system file downloads during repairs)
- Download the
sys_repair.bat
file - Right-click the file and select "Run as administrator"
# Alternative: Launch from Command Prompt (Admin)
cd path/to/script
sys_repair.bat
The script presents an interactive menu with the following options:
-
Quick Status Check (
DISM /CheckHealth
)- Fast verification of system image integrity
- Recommended as first diagnostic step
-
Detailed Scan (
DISM /ScanHealth
)- Thorough system image analysis
- May take several minutes to complete
-
Repair System Image (
DISM /RestoreHealth
)- Attempts to repair corrupted system files
- Downloads replacement files if needed
- Can take 15-30 minutes depending on system state
-
System File Checker (
sfc /scannow
)- Scans and repairs corrupted Windows system files
- Recommended after DISM repairs
-
System Update Repair
- Comprehensive Windows Update troubleshooting
- Resets update-related services and components
- Cleans up driver cache
- Repairs network settings
-
Run All Sequentially
- Executes all repair operations in optimal order
- Recommended for thorough system maintenance
- Always backup important data before running system repairs
- Requires administrator privileges to execute repairs
- Some operations may require system restart
- Windows Update repairs may temporarily disable update services
- Internet connection required for downloading system files during repair
The script performs the following technical operations:
- DISM (Deployment Image Servicing and Management) operations
- System File Checker (SFC) scans
- Service management (stop/start) for:
- Background Intelligent Transfer Service (BITS)
- Windows Update Service
- MSI Installer
- Cryptographic Services
- Application Identity Service
- Registry component re-registration
- Network stack reset
- Driver state management
- Windows component cleanup
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues:
- Ensure you're running as administrator
- Check internet connectivity for file downloads
- Verify Windows Update service is accessible
- Check system drive for sufficient space
- Review logs in
%windir%\Logs\DISM\dism.log