Optimizing Windows 11


Thanks for everything. It would be great if you could disable Edge and updates.
 

My Computer

System One

  • OS
    win11
    Computer type
    PC/Desktop
    Manufacturer/Model
    amd
I'm afraid this thread will go from Windows optimization to treating knee pain and herniated discs!
I can't even imagine if I'll see my 40th birthday or if a rocket will hit my house tomorrow or if I'll die from lack of water in this country.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Thanks for everything. It would be great if you could disable Edge and updates.
good idea thank you!
I forgot it because I use uupdump config which won’t integrate edge to windows image.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I'm afraid this thread will go from Windows optimization to treating knee pain and herniated discs!
I can't even imagine if I'll see my 40th birthday or if a rocket will hit my house tomorrow or if I'll die from lack of water in this country.
I'm betting on the water, it's pretty dry around there. :p :p
 

My Computers

System One System Two

  • OS
    Win 11 Pro 25H2, Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Operating System
    Win 11 Pro 25H2, Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
Finally found the reason that caused explorer not responding ...
It was one of the commands in "disabling defender" part. removed it.

Now this script is running well with no problem.
Tested it on both official iso and the modified iso with NTLite (Post-Setup script).
All my reg files are attached.
 

Attachments

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Finally found the reason that caused explorer not responding ...
It was one of the commands in "disabling defender" part. removed it.

Now this script is running well with no problem.
Tested it on both official iso and the modified iso with NTLite (Post-Setup script).
All my reg files are attached.
1753359941633.webp

Windows update and Windows store are working without any issues.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Good job, Sheikh 🙏
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 Build 26200.8524
    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
    Onboard thingy
    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.
  • Operating System
    Windows 11 Pro 25H2 Build 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
I miss widgets and search bar doodles (those tiny images in search bar)
Which components are necessary to have both of them? I want to change my code and restore that part :(
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I don't understand why you both removed ContentManager from the image, and added all those blocking reg keys.

Widgets and Search highlights (doodles) have to be delivered by CDM.
 

My Computer

System One

  • OS
    Windows 7
I don't understand why you both removed ContentManager from the image, and added all those blocking reg keys.

Widgets and Search highlights (doodles) have to be delivered by CDM.
Because I don’t know how things work and which parts are related to each other
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Because I don’t know how things work and which parts are related to each other
If I may....

If you're unsure or don't know how things work, then you might want to err on the side of caution and not try to debloat.

I'm one of those "dangerous" people -- I have just enough computer knowledge to get myself in trouble if I'm not careful. Because I'm that type of person, I tend to debloat/uninstall/tweak a very few things at a time and run my system as I would for a couple of days between tweaks just to make sure I didn't screw things up......and even then, I've had to rely on image backups because I screwed around too much and broke something I couldn't fix. While one tweak works great but combined with another tweak or other debloating that "safe" tweak is now a problem.

For example, my mobo has another Beta bios available. I always wait at least a week or more once it goes final before I look at the changes and decide if I need them or not. For the record, I'm currently a couple of versions behind because the changes were not needed or didn't effect me (I'm not running 64g of ram or have a newer cpu). Once enough AGESA changes are in the bios that actually effect my system (or there is a security fix that I need) then I'll update my bios. Same thought on tweaks or debloats -- just because all the "cool kids" who are squeezing every drop of performance out of their systems are doing it, doesn't mean I need to run out and tweak my system accordingly.
 

My Computer

System One

  • OS
    Windows 11 Pro 25H2 (26200.8457)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Pre-built
    CPU
    AMD Ryzen 7 7800X3D
    Motherboard
    MSI Pro B650-VC WiFi
    Memory
    32gb Team Group (T-Force) DDR5-6000
    Graphics Card(s)
    Zotac nVidia GeForce RTX 4070 SUPER - 12gb
    Sound Card
    Sound BlasterX G6
    Monitor(s) Displays
    Koorui G2421V and ViewSonic VX2453
    Screen Resolution
    P:2560x1440 S:1920x1080
    Hard Drives
    WD Blue SN5000 - 500gb NVME
    WD Blue SN580 - 2TB NVME
    Seagate 4TB HDD - ST4000VN008-2DR166
    Keyboard
    Mountain Everest
    Mouse
    Logitech G502 Hero
    Internet Speed
    T-Mobile Home Internet
    Browser
    Firefox
    Other Info
    QNAP TS-469 Pro NAS
    TP-Link W7200 (2 unit mesh network)
    Elgato Streamdeck
If I may....

If you're unsure or don't know how things work, then you might want to err on the side of caution and not try to debloat.

I'm one of those "dangerous" people -- I have just enough computer knowledge to get myself in trouble if I'm not careful. Because I'm that type of person, I tend to debloat/uninstall/tweak a very few things at a time and run my system as I would for a couple of days between tweaks just to make sure I didn't screw things up......and even then, I've had to rely on image backups because I screwed around too much and broke something I couldn't fix. While one tweak works great but combined with another tweak or other debloating that "safe" tweak is now a problem.

For example, my mobo has another Beta bios available. I always wait at least a week or more once it goes final before I look at the changes and decide if I need them or not. For the record, I'm currently a couple of versions behind because the changes were not needed or didn't effect me (I'm not running 64g of ram or have a newer cpu). Once enough AGESA changes are in the bios that actually effect my system (or there is a security fix that I need) then I'll update my bios. Same thought on tweaks or debloats -- just because all the "cool kids" who are squeezing every drop of performance out of their systems are doing it, doesn't mean I need to run out and tweak my system accordingly.
I apologize for telling Garlin that I don't know how things work; that wasn't exactly what I intended to convey.

What I meant to say is that I do have knowledge about Windows components and the functionality of my script. However, we cannot determine which Windows image a user has on their computer, so the tweak script includes all disabling features. Many users do not modify their Windows installation media, so the tweak must accommodate those as well.

Additionally, I test my script on a virtual machine for at least one month and update it using various methods to ensure that the tweaks do not interfere with Windows updates.

I do not run my script on modified images, as I integrate all registry keys and settings into it. Therefore, running the script on such images would be a waste of time.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Waiting for a UI based optimization. Thanks for the great work!
 

My Computer

System One

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Acer Predator Helios 300 PH314-54-72ZJ
    CPU
    Intel Core i7-11800H
    Motherboard
    TGL
    Memory
    16GB (2x8 GB)
    Graphics Card(s)
    RTX 3060 Laptop GPU
    Sound Card
    Realtek ALC295
    Monitor(s) Displays
    1
    Screen Resolution
    2560 x 1440 @ 165Hz
    Hard Drives
    1TB NVMe SSD, 512GB NVMe SSD, 1TB 7200 RPM HDD
    Cooling
    Aeroblade 5th Gen 3D fan
    Keyboard
    RGB Laptop keyboard
    Mouse
    Logitech Lightsync G203
    Internet Speed
    175 Mbps up/175 Mbps down
    Browser
    Firefox with uBlock Origin and YouTube enhancing extensions..
    Antivirus
    Windows Security with Core Isolation on
Content Delivery Manager is what delivers all those "non-Windows" content features: Spotlight wallpapers, news, widgets, search highlights, pinned 3rd-party app suggestions (icons) on Start Menu. All the stuff normal users hate and want to debloat.

If you don't remove CDM, then it can only managed by a long list of individual reg settings. Which you have to dig through online guides to figure out which key blocks which matching feature. But some features cannot be blocked by known keys, so other users just kill CDM.
 

My Computer

System One

  • OS
    Windows 7
Content Delivery Manager is what delivers all those "non-Windows" content features: Spotlight wallpapers, news, widgets, search highlights, pinned 3rd-party app suggestions (icons) on Start Menu. All the stuff normal users hate and want to debloat.

If you don't remove CDM, then it can only managed by a long list of individual reg settings. Which you have to dig through online guides to figure out which key blocks which matching feature. But some features cannot be blocked by known keys, so other users just kill CDM.
As always, you gave an answer that solved the entire problem and question. Thank you!
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
before creating a UI, I like to create a clean code.
my script is very simple. it's like a teenager's homework.
I want to create some loops for reg keys instead of repeating a line thousands of times.
How can I create a function in bat file to call it every time I need it?
here is an example about my question:

Batch:
REG Query "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" /V "IsEducationEnvironment" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Siuf\Rules" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Siuf\Rules" /V "NumberOfSIUFInPeriod" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /V "NetworkThrottlingIndex" /T "REG_DWORD" /D "4294967295" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /V "SystemResponsiveness" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /V "SensorPermissionState" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V "RPSessionInterval" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /V "Value" /T "REG_SZ" /D "Deny" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /V "DODownloadMode" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /V "SearchOrderConfig" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /V "DisabledByGroupPolicy" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /V "DisableTailoredExperiencesWithDiagnosticData" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /V "DoNotShowFeedbackNotifications" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /V "EnableActivityFeed" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /V "PublishUserActivities" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /V "UploadUserActivities" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" /V "DisableAIDataAnalysis" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" /V "TurnOffWindowsCopilot" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /V "CrashDumpEnabled" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /V "DisableWpbtExecution" /T "REG_DWORD" /D "1" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /V "ClearPageFileAtShutdown" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Control\remote Assistance" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Control\remote Assistance" /V "fAllowToGetHelp" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /V "IRPStackSize" /T "REG_DWORD" /D "00000030" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /V "Status" /T "REG_DWORD" /D "0" /F) >nul 2>&1

REG Query "HKLM\SYSTEM\Maps" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "HKLM\SYSTEM\Maps" /V "AutoUpdateEnabled" /T "REG_DWORD" /D "0" /F) >nul 2>&1

if you focus on it, it's like this:
Code:
REG Query "%regaddress%" >nul 2>&1 && if %ERRORLEVEL% EQU 0 (REG Add "%regaddress%" /V "%value%" /T "%Type%" /D "%data%" /F) >nul 2>&1
instead of repeating, I want to create a table of reg addresses, their type and value and instead of repeating the code, I call a function for it which reads the data from that table. maybe a .csv file?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Back
Top Bottom