[windows batch] "Disable reserved storage for updates"

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
24 Nis 2024
Mesajlar
74
Tepki puanı
2
2 HİZMET YILI
How to run

batch [ you (windows + R) -> cmd -> batch ]

effect :D
1. Free up disk space 2. Manage updates more easily 3. Improve system performance


Disable reserved storage for updates <- If you have any questions about this or any of the commands below, please leave them in the comments
Bash:
@echo off
:: Ensure admin privileges
fltmc >nul 2>&1 || (
    echo Administrator privileges are required.
    PowerShell Start -Verb RunAs '%0' 2> nul || (
        echo Right-click on the script and select "Run as administrator".
        pause & exit 1
    )
    exit 0
)
:: Initialize environment
setlocal EnableExtensions DisableDelayedExpansion

:: ----------------------------------------------------------
:: -----------Disable reserved storage for updates-----------
:: ----------------------------------------------------------
echo --- Disable reserved storage for updates
dism /online /Set-ReservedStorageState /State:Disabled /NoRestart
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "MiscPolicyInfo" /t REG_DWORD /d "2" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "PassedPolicy" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: Pause the script to view the final state
pause
:: Restore previous environment settings
endlocal
:: Exit the script successfully
exit /b 0


Command to activate [Revert]
Bash:
@echo off
:: Ensure admin privileges
fltmc >nul 2>&1 || (
    echo Administrator privileges are required.
    PowerShell Start -Verb RunAs '%0' 2> nul || (
        echo Right-click on the script and select "Run as administrator".
        pause & exit 1
    )
    exit 0
)
:: Initialize environment
setlocal EnableExtensions DisableDelayedExpansion


:: ----------------------------------------------------------
:: -----------Disable reserved storage for updates-----------
:: ----------------------------------------------------------
echo --- Disable reserved storage for updates
dism /online /Set-ReservedStorageState /State:Disabled /NoRestart
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "MiscPolicyInfo" /t REG_DWORD /d "2" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "PassedPolicy" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------


:: Pause the script to view the final state
pause
:: Restore previous environment settings
endlocal
:: Exit the script successfully
exit /b 0
 
Son düzenleme:
Uzman Üye
Katılım
21 Mar 2019
Mesajlar
154
Tepki puanı
40
Ödüller
7
Yaş
32
7 HİZMET YILI
Great work but the code can be shortened to the following

  1. Open PowerShell as an administrator: Press the Windows key, type PowerShell, then right-click on Windows PowerShell and select "Run as administrator".
  2. Enter the following command: You can execute the following command to disable Reserved Storage:
Kod:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" -Name "ShippedWithReserves" -Value 0

This command disables the feature, but you may need to restart your computer for the change to take effect. Use this method cautiously as changes made to the registry can affect system stability if not done correctly.
 
Onaylı Üye
Katılım
14 Eki 2020
Mesajlar
73
Tepki puanı
6
Ödüller
5
Yaş
33
5 HİZMET YILI
yesterday the servers were down
 
预感
Uzman Üye
Katılım
7 Ara 2023
Mesajlar
150
Tepki puanı
17
Ödüller
2
2 HİZMET YILI
Disabling reserved storage for updates can have several positive effects on your system:
 
Üye
Katılım
27 Tem 2021
Mesajlar
48
Tepki puanı
2
Ödüller
4
Yaş
25
4 HİZMET YILI
Free up disk space
Manage updates more easily
Improve system performance
 
Üye
Katılım
4 May 2024
Mesajlar
49
Tepki puanı
2
Ödüller
1
Yaş
29
2 HİZMET YILI
To disable reserved storage for Windows updates, follow these steps:

1. Press the Windows key + R to open the Run dialog box.
2. Type "regedit" and press Enter to open the Registry Editor.
3. Navigate to the following registry key:
```
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager
```
4. Look for a DWORD value named "ShippedWithReserves" in the right pane.
5. Double-click on "ShippedWithReserves" and change its value data to 0.
6. Click OK and close the Registry Editor.
7. Restart your computer to apply the changes.

Keep in mind that modifying the registry can potentially cause system instability if not done correctly, so proceed with caution and consider creating a backup of your registry before making any changes.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst