Slimdown10 – turn Windows 10 22H2 or LTSC 2021 into classic/legacy Windows

Discussion in 'Windows 10' started by Deleted member 190847, Feb 15, 2023.

  1. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    286
    347
    10
    #1661 sergey130270, Oct 17, 2024
    Last edited: Oct 17, 2024
    Good evening. I'll do it tomorrow.
     
  2. robertcollier4

    robertcollier4 MDL Novice

    Dec 19, 2016
    20
    19
    0
    #1662 robertcollier4, Oct 18, 2024
    Last edited: Oct 18, 2024
    @schubidubi - can you post your additions you mentioned in post #1271 on this thread, you seem to have some valuable additional tweaks based upon your research that would benefit myself and other members of this forum. Or, if posting just additions is too involved - can you post your final files so that we can do a diff and see what was added?
     
  3. chinotto

    chinotto MDL Novice

    Aug 17, 2009
    24
    0
    0
    hello which tool is recommended for creating iso?
     
  4. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    I use NTLite for this.
     
  5. chinotto

    chinotto MDL Novice

    Aug 17, 2009
    24
    0
    0
    Does ntlite convert from folder to iso?
     
  6. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    Yes
     
  7. sainfo

    sainfo MDL Senior Member

    Dec 6, 2021
    334
    670
    10
    SunLion, I need to delete the Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe folder
    folder from the connected image, but it just doesn’t work. Can you tell me the solution? I found a solution on the Internet, but it does not remove it.

    rem == remove sechealthui appx package ==
    dism /scratchdir:temp /image:mount /remove-provisionedappxpackage /packagename:Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    I am currently in another location, away from home, taking care of my hospitalized daughter.

    I remember that in some tests I saw this application being deleted by the script, I don't know if it was from SD10 or SD11.

    I will download the SD11 package and analyze it.

    I will respond later if there is a solution through the script.
     
  9. haris_mdlf69

    haris_mdlf69 MDL Addicted

    Oct 23, 2018
    601
    1,058
    30
    Hope she recovers soon, best wishes to you and your family.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    Thanks!
     
  11. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    The SD11v202_4.8.26 script removes this application when it is present in the image.

    See the attached log file, line 1555
     

    Attached Files:

  12. sainfo

    sainfo MDL Senior Member

    Dec 6, 2021
    334
    670
    10
    #1672 sainfo, Oct 20, 2024
    Last edited: Oct 21, 2024
    Thank you very much for your assistance. I wish your daughter a speedy recovery. I wish all the best to you and your family!

    Regarding Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe, I found it in your Log file, but I couldn’t find the deletion code itself:
    ===========================================================
    Removing Provisioned Appx Packages
    ===========================================================
    Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe

    I'm not sure if this is the code to remove it:
    rem Remove Security Health system tray Icon
    Reg delete "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SecurityHealth /f >nul 2>&1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    #1674 SunLion, Oct 20, 2024
    Last edited: Oct 20, 2024
    Sorry, I'm not sure I understand what you want to do.

    Do you want to remove the app folder in C:\Windows\SystemApps\ as well?

    After removing the app with the code above, you have to take ownership of the folder in order to remove it.

    For this you can use the attached script.
    Edit the folder name to remove.
    Rename it to CMD and run as administrator.
     

    Attached Files:

  14. sainfo

    sainfo MDL Senior Member

    Dec 6, 2021
    334
    670
    10
    I wanted to delete only the Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe folder in order to remove the Windows Security Start icon. If I delete the Microsoft.SecHealthUI_1000.26100.1.0_x64__8wekyb3d8bbwe folder from a mounted image or from an already installed system, this icon is not removed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,925
    30
    Right-click on the Windows Security Start icon and go to properties > details > folder path. From there we can perform the removal.
     
  16. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    286
    347
    10
    #1677 sergey130270, Oct 20, 2024
    Last edited: Oct 20, 2024
    Hi there
    Excuse me
    add this code to your script
    ECHO.
    ECHO ============================================================
    ECHO Mount Image Registry
    ECHO ============================================================
    reg load HKLM\WIM_DEFAULT "D:\WimLocal\Mount\Windows\System32\config\DEFAULT"
    reg load HKU\WIM_NTUSER "D:\WimLocal\Mount\Users\Default\NTUSER.DAT"
    reg load HKLM\WIM_SOFTWARE "D:\WimLocal\Mount\Windows\System32\config\SOFTWARE"
    reg load HKLM\WIM_SYSTEM "D:\WimLocal\Mount\Windows\System32\config\SYSTEM"

    ECHO.
    ECHO ==============================================
    ECHO Removing system UWP apps from Registry
    ECHO ==============================================
    for %%u in (SecHealthUI) do (
    for /f %%a in ('reg query "HKLM\WIM_SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications" /s /f "%%u" /k ^| find /i "AppxAllUserStore"') do if not errorlevel 1 (reg delete %%a /f >nul 2>&1)
    ECHO Removing %%u from the Registry
    )

    for %%u in (SecHealthUI) do (
    for /f %%a in ('reg query "HKLM\WIM_SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Staged" /s /f "%%u" /k ^| find /i "AppxAllUserStore"') do if not errorlevel 1 (reg delete %%a /f >nul 2>&1)
    ECHO Removing %%u from the Registry
    )

    ECHO.
    ECHO ============================================================
    ECHO Removing system UWP apps from Disk
    ECHO ============================================================
    for %%u in (SecHealthUI) do (
    for /f "tokens=1 delims=" %%a in ('dir /b /ad "D:\WimLocal\Mount\Program Files\WindowsApps" 2^>nul ^| find /i "%%u"') do (
    ECHO Removing %%a from Disk
    RD /s /q "D:\WimLocal\Mount\Program Files\WindowsApps\%%a"
    )
    )
    reg unload HKLM\WIM_DEFAULT
    reg unload HKLM\WIM_Software
    reg unload HKLM\WIM_SYSTEM
    reg unload HKU\WIM_NTUSER
     
  17. sainfo

    sainfo MDL Senior Member

    Dec 6, 2021
    334
    670
    10
    #1678 sainfo, Oct 20, 2024
    Last edited: Oct 22, 2024
    Hello, thank you very much, I will try your version of the code.

    Yes, everything worked, everything is OK! Thank you very much!

    I corrected my code, in general it turned out something like this. Everything worked well, thank you very much again!
    Code:
    @echo off
    
    TITLE Working with the install.wim image - modified by sainfo
    CLS
    
    ECHO.
    ECHO ============================================================
    ECHO Mounting the install.wim image
    ECHO ============================================================
    dism /Mount-Wim /WimFile:D:\WimLocal\install.wim /index:1 /mountdir:D:\WimLocal\mount
    rem Dism /Image:D:\WimLocal\mount /Set-Edition:IoTEnterpriseS
    rem dism /Image:D:\WimLocal\mount /Add-Package /PackagePath:D:\WimLocal\updates
    rem dism /Image:D:\WimLocal\mount /cleanup-image /startcomponentcleanup /resetbase
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading WindowsNotepad
    ECHO ============================================================
    D:\WimLocal\SU64.exe /w /s Powershell "Get-AppxProvisionedPackage -Path D:\WimLocal\Mount|? PackageName -NotMatch 'DesktopAppInstaller|SecHealthUI|WindowsNotepad|ScreenSketch'|Remove-AppxProvisionedPackage"
    
    ECHO.
    ECHO ============================================================
    ECHO Loading registry keys
    ECHO ============================================================
    reg load HKLM\WIM_Software D:\WimLocal\Mount\windows\system32\config\software
    reg load HKLM\WIM_SYSTEM D:\WimLocal\Mount\Windows\System32\Config\SYSTEM
    reg load HKU\WIM_NTUSER D:\WimLocal\Mount\Users\Default\NTUSER.DAT
    
    ECHO.
    ECHO ============================================================
    ECHO Applying tweaks to registry keys - Registry Tweak Tool
    ECHO ============================================================
    D:\WimLocal\SU64.exe /w /s reg import D:\WimLocal\Tweak\SOFTWARE.reg
    D:\WimLocal\SU64.exe /w /s reg import D:\WimLocal\Tweak\SYSTEM.reg
    reg import D:\WimLocal\Tweak\USER.reg
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading registry keys
    ECHO ============================================================
    reg unload HKLM\WIM_Software
    reg unload HKLM\WIM_SYSTEM
    reg unload HKU\WIM_NTUSER
    
    ECHO.
    ECHO ============================================================
    ECHO Integration of language packs and updates
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Add-Package /PackagePath:D:\WimLocal\language\ru-ru
    dism /image:D:\WimLocal\Mount /Add-Package /PackagePath:D:\WimLocal\language\other
    
    ECHO.
    ECHO ============================================================
    ECHO We apply all the settings for the Russian language with the command
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-AllIntl:ru-RU
    
    ECHO.
    ECHO ============================================================
    ECHO System interface language
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-UILang:ru-RU
    
    ECHO.
    ECHO ============================================================
    ECHO System locale language for non-Unicode
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-SysLocale:ru-RU
    
    ECHO.
    ECHO ============================================================
    ECHO Currency format, time format
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-UserLocale:ru-RU
    
    ECHO.
    ECHO ============================================================
    ECHO Keyboard input settings
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-InputLocale:0419:00000419
    
    ECHO.
    ECHO ============================================================
    ECHO Time zone
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Set-TimeZone:"Russian Standard Time"
    
    ECHO.
    ECHO ============================================================
    ECHO We implement cumulative updates into the image
    ECHO ============================================================
    dism /Image:D:\WimLocal\mount /Add-Package /PackagePath:D:\WimLocal\updates
    dism /Image:D:\WimLocal\mount /cleanup-image /startcomponentcleanup /resetbase
    
    ECHO.
    ECHO ============================================================
    ECHO Loading registry keys
    ECHO ============================================================
    reg load HKLM\WIM_Software D:\WimLocal\Mount\windows\system32\config\software
    
    ECHO.
    ECHO ============================================================
    ECHO disable Copilot
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Microsoft\Windows\Shell\Copilot" /v "IsCopilotAvailable" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\Shell\Copilot" /v "CopilotDisabledReason" /t REG_SZ /d "FeatureIsDisabled" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\Shell\Copilot\BingChat" /v "IsUserEligible" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsCopilot" /v "TurnOffWindowsCopilot" /t REG_DWORD /d "1" /f
    
    ECHO.
    ECHO ============================================================
    ECHO disable windows defender, notifications, updates and malicious software removal tool
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Microsoft\Windows Defender\Features" /v "TamperProtection" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender" /v "PUAProtection" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "LocalSettingOverrideDisableRealtimeMonitoring" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Reporting" /v "WppTracingLevel" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Reporting" /v "DisableGenericRePorts" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Reporting" /v "DisableEnhancedNotifications" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Spynet" /v "LocalSettingOverrideSpynetReporting" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d "2" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Spynet" /v "SpynetReporting" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Spynet" /v "DisableBlockAtFirstSeen" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection" /v "EnableNetworkProtection" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Windows Defender/Operational" /v "Enabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender Security Center\Systray" /v "HideSystray" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\MRT" /v "DontReportInfectionInformation" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d "1" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MRT.exe" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Run" /v "SecurityHealth" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance" /v "Enabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender Security Center\Notifications" /v "DisableNotifications" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender Security Center\Notifications" /v "DisableEnhancedNotifications" /t REG_DWORD /d "1" /f
    
    ECHO.
    ECHO ============================================================
    ECHO disable smartscreen
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Microsoft\PolicyManager\default\Browser\AllowSmartScreen" /v "value" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\SmartScreen" /v "ConfigureAppInstallControlEnabled" /t REG_DWORD /d "1" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows Defender\SmartScreen" /v "ConfigureAppInstallControl" /t REG_SZ /d "Anywhere" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Internet Explorer\PhishingFilter" /v "Enabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Internet Explorer\PhishingFilter" /v "EnabledV8" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Internet Explorer\PhishingFilter" /v "EnabledV9" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Edge" /v "SmartScreenEnabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\MicrosoftEdge\PhishingFilter" /v "EnabledV9" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\3" /v "2301" /t REG_DWORD /d "3" /f
    
    ECHO.
    ECHO ============================================================
    ECHO keep disabled apps from returning
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" /f
    reg add "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe" /f
    
    ECHO.
    ECHO ============================================================
    ECHO hide Microsoft Edge from apps & features
    ECHO ============================================================
    reg delete "HKLM\WIM_Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f
    reg delete "HKLM\WIM_Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f
    reg delete "HKLM\WIM_Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f
    
    ECHO.
    ECHO ============================================================
    ECHO disable GameDVR
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d "0" /f
    
    ECHO.
    ECHO ============================================================
    ECHO delete some scheduled tasks
    ECHO ============================================================
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Autochk" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Customer Experience Improvement Program" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\DiskDiagnostic" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Maintenance" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\NetTrace" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Offline Files" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Windows Defender" /f
    reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\XblGameSave" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Windows Update only installs security updates, delays other updates by 2 years
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 3 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodInDays /t REG_DWORD /d 365 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsUpdate" /v DeferQualityUpdates /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\WindowsUpdate" /v DeferQualityUpdatesPeriodInDays /t REG_DWORD /d 365 /f
    
    ECHO.
    ECHO ============================================================
    ECHO Disable and Remove Telemetry and Spying
    ECHO ============================================================
    reg add "HKLM\WIM_Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Internet Explorer\SQM" /v "DisableCustomerImprovementProgram" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\PCHealth\ErrorReporting" /v "DoReport" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowDeviceNameInTelemetry" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowDesktopAnalyticsProcessing" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowCommercialDataPipeline" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowUpdateComplianceProcessing" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "AllowWUfBCloudProcessing" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "DisableEnterpriseAuthProxy" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\DataCollection" /v "DisableOneSettingsDownloads" /t REG_DWORD /d 1 /f
    reg add "HKLM\WIM_Software\Microsoft\PolicyManager\default\System\AllowTelemetry" /v "value" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
    reg add "HKLM\WIM_Software\Microsoft\PolicyManager\current\Device\System" /v "AllowExperimentation" /t REG_DWORD /d "0" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Remove Security Health system tray Icon
    ECHO ============================================================
    Reg delete "HKLM\WIM_Software\Microsoft\Windows\CurrentVersion\Run" /v SecurityHealth /f >nul 2>&1
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading registry keys
    ECHO ============================================================
    reg unload HKLM\WIM_Software
    
    ECHO.
    ECHO ============================================================
    ECHO Loading registry keys
    ECHO ============================================================
    reg load HKLM\WIM_SYSTEM D:\WimLocal\Mount\Windows\System32\Config\SYSTEM
    
    ECHO.
    ECHO ============================================================
    ECHO turn off Smart App Control
    ECHO ============================================================
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Control\CI\Policy" /v "VerifiedAndReputablePolicyState" /t REG_DWORD /d "0" /f
    
    ECHO.
    ECHO ============================================================
    ECHO stop edge services
    ECHO ============================================================
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\edgeupdate" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\edgeupdatem" /v "Start" /t REG_DWORD /d "4" /f >nul
    
    ECHO.
    ECHO ============================================================
    ECHO stop defender services
    ECHO ============================================================
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\SecurityHealthService" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\Sense" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\WdBoot" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\WdFilter" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\WdNisDrv" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\WdNisSvc" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\WinDefend" /v "Start" /t REG_DWORD /d "4" /f >nul
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\wscsvc" /v "Start" /t REG_DWORD /d "4" /f >nul
    
    ECHO.
    ECHO ============================================================
    ECHO Disabling NVDia services
    ECHO ============================================================
    reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\NVDisplay.ContainerLocalSystem" /v "Start" /t REG_DWORD /d "4" /f >nul
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading registry keys
    ECHO ============================================================
    reg unload HKLM\WIM_SYSTEM
    
    ECHO.
    ECHO ============================================================
    ECHO Loading registry keys
    ECHO ============================================================
    reg load HKU\WIM_NTUSER D:\WimLocal\Mount\Users\Default\NTUSER.DAT
    
    ECHO.
    ECHO ============================================================
    ECHO Enable My Computer Icon on desktop
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f >nul
    
    ECHO.
    ECHO ============================================================
    ECHO Don't add "Shortcut" text to the name of newly created shortcuts
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "Link" /t REG_BINARY /d 00000000 /f
    
    ECHO.
    ECHO ============================================================
    ECHO Reducing the delay in launching applications from startup
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v "StartupDelayInMSec" /t REG_DWORD /d "0" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Disable the Low Disk Space Warning
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoLowDiskSpaceChecks" /t REG_DWORD /d "1" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Disable autorun of removable media
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" /v "DisableAutoplay" /t REG_DWORD /d "1" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Hide "Recently used files" in Quick access in Windows Explorer
    ECHO ============================================================
    reg add "HKLM\WIM_NTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_NTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_NTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d "0" /f
    reg add "HKLM\WIM_NTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d "0" /f
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading registry keys
    ECHO ============================================================
    reg unload HKLM\WIM_NTUSER
    
    ECHO.
    ECHO ============================================================
    ECHO Get ahead of the Windows edition on which the image is configured
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Get-CurrentEdition
    
    ECHO.
    ECHO ============================================================
    ECHO Uninstalling Microsoft Paint
    ECHO ============================================================
    dism /image:D:\WimLocal\Mount /Remove-Capability /CapabilityName:Microsoft.Windows.MSPaint~~~~0.0.1.0
    
    ECHO.
    ECHO ============================================================
    ECHO Removing packages from an image without specifying the full name
    ECHO ============================================================
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft-Windows-OneDrive /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft-Windows-Hello-Face /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c microsoft-windows-hello-face-package-Wrapper /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.WindowsTerminal_2022.507.446.0_neutral /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.Xbox.TCUI_2022.507.446.0_neutral /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.XboxGameOverlay_2022.507.446.0_neutral /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.XboxGamingOverlay_2022.507.447.0_neutral /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.XboxIdentityProvider_2022.507.447.0_neutral /r
    D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.XboxSpeechToTextOverlay_2022.507.446.0_neutral /r
    
    ECHO.
    ECHO ============================================================
    ECHO Removing protected folders in an image
    ECHO ============================================================
    D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\System32\InputMethod
    D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\System32\migration
    D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\System32\migwiz
    D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\System32\Recovery
    rem D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\WinSxS\Backup
    
    ECHO.
    ECHO ============================================================
    ECHO Removing Edge in an image and its services
    ECHO ============================================================
    Dism /Image:D:\WimLocal\Mount /Remove-Edge
    
    ECHO.
    ECHO ============================================================
    ECHO Loading registry keys
    ECHO ============================================================
    reg load HKLM\WIM_Software D:\WimLocal\Mount\windows\system32\config\software
    
    ECHO.
    ECHO ============================================================
    ECHO Cleaning up Edge remnants in the registry
    ECHO ============================================================
    D:\WimLocal\SU64.exe /w /s Powershell "LS HKLM:\WIM_Software -Rec -ea 0|?{$_.Name -Match 'edge' -and $_.Name -NotMatch 'EdgeGesture'}|RI -Rec"
    
    ECHO.
    ECHO ============================================================
    ECHO Unloading registry keys
    ECHO ============================================================
    reg unload HKLM\WIM_Software
    
    ECHO.
    ECHO ============================================================
    ECHO remove sechealthui appx package
    ECHO Mount Image Registry
    ECHO ============================================================
    reg load HKLM\WIM_DEFAULT "D:\WimLocal\Mount\Windows\System32\config\DEFAULT"
    reg load HKU\WIM_NTUSER "D:\WimLocal\Mount\Users\Default\NTUSER.DAT"
    reg load HKLM\WIM_SOFTWARE "D:\WimLocal\Mount\Windows\System32\config\SOFTWARE"
    reg load HKLM\WIM_SYSTEM "D:\WimLocal\Mount\Windows\System32\config\SYSTEM"
    
    ECHO.
    ECHO ==============================================
    ECHO Removing system UWP apps from Registry
    ECHO ==============================================
    for %%u in (SecHealthUI) do (
    for /f %%a in ('reg query "HKLM\WIM_SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications" /s /f "%%u" /k ^| find /i "AppxAllUserStore"') do if not errorlevel 1 (reg delete %%a /f >nul 2>&1)
    ECHO Removing %%u from the Registry
    )
    
    for %%u in (SecHealthUI) do (
    for /f %%a in ('reg query "HKLM\WIM_SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Staged" /s /f "%%u" /k ^| find /i "AppxAllUserStore"') do if not errorlevel 1 (reg delete %%a /f >nul 2>&1)
    ECHO Removing %%u from the Registry
    )
    
    ECHO.
    ECHO ============================================================
    ECHO Removing system UWP apps from Disk
    ECHO ============================================================
    for %%u in (SecHealthUI) do (
    for /f "tokens=1 delims=" %%a in ('dir /b /ad "D:\WimLocal\Mount\Program Files\WindowsApps" 2^>nul ^| find /i "%%u"') do (
    ECHO Removing %%a from Disk
    RD /s /q "D:\WimLocal\Mount\Program Files\WindowsApps\%%a"
    )
    )
    reg unload HKLM\WIM_DEFAULT
    reg unload HKLM\WIM_Software
    reg unload HKLM\WIM_SYSTEM
    reg unload HKU\WIM_NTUSER
    
    ECHO.
    ECHO ============================================================
    ECHO Initialization to start working with the WinSxS directory
    ECHO ============================================================
    Dism /Image:D:\WimLocal\Mount /Cleanup-Image /AnalyzeComponentStore
    
    ECHO.
    ECHO ============================================================
    ECHO Initializing WinSxS directory cleanup
    ECHO ============================================================
    Dism /Image:D:\WimLocal\Mount /Cleanup-Image /StartComponentCleanup
    
    ECHO.
    ECHO ============================================================
    ECHO Removing obsolete and unused versions of WinSxS catalog components
    ECHO ============================================================
    Dism /Image:D:\WimLocal\Mount /Cleanup-Image /StartComponentCleanup /ResetBase
    
    ECHO.
    ECHO ============================================================
    ECHO Compressing update packages
    ECHO ============================================================
    Dism /Image:D:\WimLocal\Mount /Cleanup-Image /SPSuperseded
    
    ECHO.
    ECHO ============================================================
    ECHO Saving the image to install.wim
    ECHO ============================================================
    dism /Unmount-Wim /MountDir:D:\WimLocal\Mount /Commit
    dism /cleanup-wim
    
    ECHO.
    ECHO ============================================================
    ECHO Exporting the image to new_install.wim
    ECHO ============================================================
    DISM /Export-Image /SourceImageFile:D:\WimLocal\install.wim /SourceIndex:1 /DestinationImageFile:D:\WimLocal\new_install.wim /Compress:maximum
    
    pause
    exit
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    3,559
    14,614
    120
    @sergey130270 can you advise? Cheers
     
  19. mooty221

    mooty221 MDL Novice

    Aug 11, 2016
    17
    18
    0
    is there a fix for Windows 11 when renaming items on the desktop nothing happens? F2 works, but if you right click the item and click rename nothing happens