Windows 10: Wrote a batch script for Windows maintenance – it’s saving me a ton of time

Discus and support Wrote a batch script for Windows maintenance – it’s saving me a ton of time in Windows 10 Ask Insider to solve the problem; [ATTACH] I made a Windows Maintenance Tool in batch — it's simple, clean, and actually useful Hey everyone, I’ve been messing around with batch... Discussion in 'Windows 10 Ask Insider' started by /u/Lil_Batti, Jun 8, 2025 at 8:47 PM.

  1. Wrote a batch script for Windows maintenance – it’s saving me a ton of time


    Wrote a batch script for Windows maintenance – it’s saving me a ton of time OHtf2S05euzKHNncr_wwGjHMO_droewMv7-bE6BLX1Q.jpg
    I made a Windows Maintenance Tool in batch — it's simple, clean, and actually useful


    Hey everyone,

    I’ve been messing around with batch scripting lately and decided to put together a Windows maintenance tool. It’s basically a one-stop script that can help clean up your system, run built-in diagnostics, fix common network issues, and generate system reports — all from one terminal menu.

    It started as a personal project for my own use, but it’s become pretty handy, so I figured I’d share it.

    What it does:

    • Run things like SFC, DISM, CHKDSK without digging through menus
    • Restart network adapters with one click (auto-detects active ones)
    • Reset Windows Update services (stops + clears cache + restarts)
    • DNS tools: flush, set Google/Cloudflare, or custom DNS input
    • Generate full system reports (driver list, system info, IP config) — saved as 3 separate .txt files to keep it organized
    • Option to clean up temp files and do basic optimization

    I made sure nothing destructive runs silently — most of it uses built-in Windows tools like netsh, ipconfig, systeminfo, etc.

    Why I made it:


    I got tired of typing the same commands every time someone had a problem, so this just automates everything. It’s also a nice little project for learning batch scripting.

    If anyone wants to try it or has feedback, Download link: https://mega.nz/folder/HAFDHDYK#rj4McXHXeWHA1xn7Ph9DbA

    Let me know if there's anything you'd add or improve — I’m still updating it.

    https://preview.redd.it/hwdznsynps5...bp&s=2afcea96bebce4d15ceeaf9be38ba1634cdb149c

    submitted by /u/Lil_Batti
    [link] [comments]

    :)
     
    /u/Lil_Batti, Jun 8, 2025 at 8:47 PM
    #1
  2. Try3 Win User

    /cleanmgr /sagerun in batch scripts

    Martin, I run SageSet as Admin. Perhaps that's what saves me?
    Doesn't the dialog of checkboxes appear when you run SageSet:NNN?
    Wrote a batch script for Windows maintenance – it’s saving me a ton of time [​IMG]
    It's only speculation but, in case previous attempts have messed things up, check HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches for all StateFlags0096 entries and delete them. That, I think, should make the dialog appear again for SageSet so you can start again from scratch
    Wrote a batch script for Windows maintenance – it’s saving me a ton of time 374091d1661705918t-cleanmgr-sagerun-batch-scripts-all-options-selected-trimmed.png
    Denis
     
  3. Julivgar Win User
    Netfix Batch Script- Fix internet connection

    Somebody please try my batch script Netfix and leave feedback so I can improve it. thank you!

    My goal is to make a troubleshooter to help the built in "Windows Network Diagnostics" fix internet connection problems. How can you help?

    1. Download/copy the code on notepad then save as "Netfix.bat" or "Netfix.cmd"

    2. Test the Batch script

    3. Provide feedback and/or suggestions

    Thank you!
     
  4. yegorsw Win User

    Wrote a batch script for Windows maintenance – it’s saving me a ton of time

    Run the audio troubleshooter from a batch script

    I have an automated home theatre setup - a batch script that enables my TV as a display, and changes the TV to be my primary display (so games and apps open on my TV instead of my monitor).

    The same script also changes my default audio device to be the TV.

    The problem is every time I turn off my TV, it disappears from the list of audio output devices in Windows 10, and even when I turn it back on, it does not appear in the list. However, if I RIGHT CLICK on the audio icon and select "troubleshoot sound problems"
    and immediately cancel/close the troubleshooter, the TV is automagically added to my list of output devices.

    My question is - is there any way to have this troubleshooter be launched from a batch script and instantly closed? Alternatively, is there a way to force a refresh of the audio devices through a batch script?
     
Thema:

Wrote a batch script for Windows maintenance – it’s saving me a ton of time

Loading...
  1. Wrote a batch script for Windows maintenance – it’s saving me a ton of time - Similar Threads - Wrote batch script

  2. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  3. Batch scripting

    in Windows 10 Gaming
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  4. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  5. PageFile.sys batch script

    in Windows 10 Virtualization
    PageFile.sys batch script: Hello, I need help writing a batch script that would configure Windows Virtual Memory based on the amount of RAM installed If you have 4 GB of RAM, set virtual memory to 8 GB (Custom size: set both initial and maximum size to 8192) If you have 8 GB of RAM, set virtual memory...
  6. Batch Rename Script Help!

    in Windows 10 Support
    Batch Rename Script Help!: Hello! I am very new to this and need a little help. I am trying to create a batch file that will rename files that are called png_X.png (the X being the number page it is). The code I have is below. It works fine with out the pipe sort command but it sorts the by the ones...
  7. Batch Scripts / Programs.

    in Windows 10 Performance & Maintenance
    Batch Scripts / Programs.: The members and quests who use this forum know how professional, informative and helpful it is! In order to help members solve their problems/issues we often ask them to run certain programs and perform certain tasks and then upload [ post ] the results to the forum for us...
  8. Batch scripting problems

    in Windows 10 Ask Insider
    Batch scripting problems: So i found a bug. In batch scripting, I can only store 3 variables. I don't know the cause for this. Here's the code, if you need it. @ echo off title Elevator OS by Lackmey on YouTube and Reddit set gdata=No data found (this one works) set 1data=No data found (this one...
  9. Fronk's maintenance script

    in Windows 10 Performance & Maintenance
    Fronk's maintenance script: Id like to share a script Ive made/ assembled as a thank you for being able to view and use this forum and 7 forum previously. Im not entirely shore how to post it but here goes-LoL.*Cool copy the .txt below and change to to .bat extension on you desktop or root.(script is...
  10. Batch script question

    in Windows 10 Support
    Batch script question: Hello, I want make a batch script to delete a spefic folder on the C disk, but how can I get only that spefic folder? I got this: Code: FOR /D %%p IN ("C:\USERS\%USERNAME%\Downloads\*.*") DO rmdir "%%p" /s /q cd C:\USERS\%USERNAME%\Downloads\ del *.* /q /s timeout /t 5...