Solved How to Automate system scan?


thecaretaker

Well-known member
Member
VIP
Local time
6:32 AM
Posts
372
Location
1066 Country
OS
Windows 11 Pro 25H2 26200.7922
I'm just wondering (after reading another post about frequency of scans), Is it possible to automate the following scan scripts that I normally run manually in Command Prompt(as admin) automatically using a batch file. It would save me having to copy pasting every time. Just being lazy ;-)

Code:
DISM.exe /Online /Cleanup-Image /Restorehealth
sfc /scannow
Dism.exe /online /Cleanup-Image /StartComponentCleanup
 

My Computer My Computer

At a glance

Windows 11 Pro 25H2 26200.7922Intel Core i9 13900F2 x Kingston Fury 32gb DDR5 5600 BeastGigabyte Eagle (Nvidia) RTX 3060
OS
Windows 11 Pro 25H2 26200.7922
Computer type
PC/Desktop
Manufacturer/Model
Local shop built (KC Computers Ltd)
CPU
Intel Core i9 13900F
Motherboard
Gigabyte Z690 Gaming X (rev. 1.0/1.1) - (BIOS: F32 09 18 2025)
Memory
2 x Kingston Fury 32gb DDR5 5600 Beast
Graphics Card(s)
Gigabyte Eagle (Nvidia) RTX 3060
Sound Card
Chord Async USB 44.1kHz - 384kHz 2Qute DAC
Monitor(s) Displays
Gigabyte AORUS FO32U2 32” OLED Flat Gaming Monitor, 0.03ms, KVM, 250 cd/m2, FreeSync Premium Pro, HDR True Black 400
Screen Resolution
3840 x 2160 (UHD), 240Hz
Hard Drives
1 x KINGSTON NVMe M.2 SSDSKC3000D2048G 2TB
1 x Samsung SSD 870 EVO 250GB
2 x Crucial CT4000MX500SSD1 4TB
2 x Crucial CT2000MX500SSD1 2TB
1 x Crucial CT250MX500SSD1 250.0 GB
PSU
Gigabyte 750w
Case
Fractal Torrent
Cooling
Stock Intel CPU, 2 x Fractal 180mm PWM (front), 3 x Fractal 140mm PWM (bottom)
Keyboard
Logitech MX Mechanical Wireless Illuminated Performance Keyboard
Mouse
Logitech MX Master 3S Wireless Performance Mouse
Internet Speed
900 Mbps/900 Mbps Trooli FTTP
Browser
Firefox
Antivirus
Eset Nod32
Yes, you could add those commands to a batch file and create a scheduled task to run it
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
Would that be just as they are?
 

My Computer My Computer

At a glance

Windows 11 Pro 25H2 26200.7922Intel Core i9 13900F2 x Kingston Fury 32gb DDR5 5600 BeastGigabyte Eagle (Nvidia) RTX 3060
OS
Windows 11 Pro 25H2 26200.7922
Computer type
PC/Desktop
Manufacturer/Model
Local shop built (KC Computers Ltd)
CPU
Intel Core i9 13900F
Motherboard
Gigabyte Z690 Gaming X (rev. 1.0/1.1) - (BIOS: F32 09 18 2025)
Memory
2 x Kingston Fury 32gb DDR5 5600 Beast
Graphics Card(s)
Gigabyte Eagle (Nvidia) RTX 3060
Sound Card
Chord Async USB 44.1kHz - 384kHz 2Qute DAC
Monitor(s) Displays
Gigabyte AORUS FO32U2 32” OLED Flat Gaming Monitor, 0.03ms, KVM, 250 cd/m2, FreeSync Premium Pro, HDR True Black 400
Screen Resolution
3840 x 2160 (UHD), 240Hz
Hard Drives
1 x KINGSTON NVMe M.2 SSDSKC3000D2048G 2TB
1 x Samsung SSD 870 EVO 250GB
2 x Crucial CT4000MX500SSD1 4TB
2 x Crucial CT2000MX500SSD1 2TB
1 x Crucial CT250MX500SSD1 250.0 GB
PSU
Gigabyte 750w
Case
Fractal Torrent
Cooling
Stock Intel CPU, 2 x Fractal 180mm PWM (front), 3 x Fractal 140mm PWM (bottom)
Keyboard
Logitech MX Mechanical Wireless Illuminated Performance Keyboard
Mouse
Logitech MX Master 3S Wireless Performance Mouse
Internet Speed
900 Mbps/900 Mbps Trooli FTTP
Browser
Firefox
Antivirus
Eset Nod32
OK, yay it works. Only problem, the command window closes after the scan so I can't read what it says. I'm sure I can find something to keep the window open until I press a key. I didn't know it would be that easy!

EDIT: I just added the word pause and it works until I press a key. I've made a shortcut and that way I can run it as admin.

OK, I'm still learning!(y)
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Pro 25H2 26200.7922Intel Core i9 13900F2 x Kingston Fury 32gb DDR5 5600 BeastGigabyte Eagle (Nvidia) RTX 3060
OS
Windows 11 Pro 25H2 26200.7922
Computer type
PC/Desktop
Manufacturer/Model
Local shop built (KC Computers Ltd)
CPU
Intel Core i9 13900F
Motherboard
Gigabyte Z690 Gaming X (rev. 1.0/1.1) - (BIOS: F32 09 18 2025)
Memory
2 x Kingston Fury 32gb DDR5 5600 Beast
Graphics Card(s)
Gigabyte Eagle (Nvidia) RTX 3060
Sound Card
Chord Async USB 44.1kHz - 384kHz 2Qute DAC
Monitor(s) Displays
Gigabyte AORUS FO32U2 32” OLED Flat Gaming Monitor, 0.03ms, KVM, 250 cd/m2, FreeSync Premium Pro, HDR True Black 400
Screen Resolution
3840 x 2160 (UHD), 240Hz
Hard Drives
1 x KINGSTON NVMe M.2 SSDSKC3000D2048G 2TB
1 x Samsung SSD 870 EVO 250GB
2 x Crucial CT4000MX500SSD1 4TB
2 x Crucial CT2000MX500SSD1 2TB
1 x Crucial CT250MX500SSD1 250.0 GB
PSU
Gigabyte 750w
Case
Fractal Torrent
Cooling
Stock Intel CPU, 2 x Fractal 180mm PWM (front), 3 x Fractal 140mm PWM (bottom)
Keyboard
Logitech MX Mechanical Wireless Illuminated Performance Keyboard
Mouse
Logitech MX Master 3S Wireless Performance Mouse
Internet Speed
900 Mbps/900 Mbps Trooli FTTP
Browser
Firefox
Antivirus
Eset Nod32
OK, I'm still learning!(y)

This may be of interest to you.
I don’t believe (from memory) that this is exclusive to “Insiders”

 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 Build 26200.8655Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz32.0 GB of I forget and the box is in storage.Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    OS
    Windows 11 Pro 25H2 Build 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    ROG SupremeFX Formula 8-Channel High Definition Audio
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list. OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • At a glance

    Windows 11 Pro 25H2 Build 26200.8655 (Wifes)13th Generation Intel® Core™ i5-1340P Process...16GB LPDDR5-52001x Intel® Iris® Xe Graphics
    Operating System
    Windows 11 Pro 25H2 Build 26200.8655 (Wifes)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - Type 82YL
    CPU
    13th Generation Intel® Core™ i5-1340P Processor(Core™ i5-1340P)
    Memory
    16GB LPDDR5-5200
    Graphics card(s)
    1x Intel® Iris® Xe Graphics
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512 GB SSD PCIe
    Mouse
    Logiteck MX Master 3S
    Internet Speed
    2000/500
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.


    Wireless Network: Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above
    Ports: 1x 1 Novo button; 2 in 1 Audio Combo jack; Micro SD Card Reader; HDMI 1.4b; 2 x USB Type-C (TBT4)
    USB 3.2 Gen 2 DP 1.4a
    PD 3.0); 1 x USB 3.2 Gen1 Type A
    Camera
    1x 1080P FHD IR/RGB Hybrid with Privacy Shutter and Dual Array Microphone
    Graphics
    1x Intel® Iris® Xe Graphics
    Monitor
    14" WUXGA
    Form Factor
    Convertible Notebook
  • Windows 11 Pro 25H2 Build 26200.8655 (Wifes)

    Yoga 7 2-in-1 14IML9 - Type 83DJ

    Processor: Intel® Core™ Ultra 7 155H Processor(Core™ Ultra 7 155H)

    Memory: 32GB LPD5X-7467

    Hard Drive: 1 TB SSD PCIe

    Wireless Network: 1x Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above

    Ports: 1 x HDMI 2.1 TMDS; 1 x Novo Button; 1 x Combo Audio Jack
    2 x USB-C (USB 4.0)
    1 x USB-A 3.2 Gen 1

    Camera: 1080P FHD IR Hybrid with Dual Microphone

    Graphics: Intel® Arc™ Graphics

    Monitor: 14" 2.8K

    ...Where's my horse?
Look at output redirection operators. > and >> can be used to send the results to a text that you can view.
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro

Latest Support Threads

Back
Top Bottom