What are you talking about, apparently something in your system has broken down. Because on any system, including 24H2, everything works fine for me and, of course, is renamed on the desktop.
Fresh install, any desktop icon right click rename does nothing. No idea why, but good to know it's just me. Sticking to Windows 10.
Hello, can you suggest some code so that I can add it to my script and completely remove Internet Explorer from the mounted image?
SunLion, whenever I try to extract the SlimDownON.7z using HoD%D4izu2LdIR8SJhT, Checksum error pops up each time. Would you please double check and provide the correct password? Thanks.
Hello. Spoiler ECHO. ECHO ============================================================ ECHO Removing capability ECHO ============================================================ for %%p in (Browser.InternetExplorer) do ( for /f "tokens=3 delims=: " %%a in ('start "" /b dism /image:\WimLocal\Mount" /Get-Capabilities ^| find "Capability Identity" ^| find "%%p"') do ( ECHO Removing %%a dism /image:\WimLocal\Mount" /Remove-Capability /CapabilityName:"%%a" ) )
Another question for you regarding the code. Everything goes fine, but in this place it gives an error, what’s wrong with the code? All add works fine, but they don’t want to delete - access is denied? Although they have the same key: reg load HKLM\WIM_Software D:\WimLocal\Mount\windows\system32\config\software Spoiler C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Autochk" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Customer Experience Improvement Program" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\DiskDiagnostic" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Maintenance" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\NetTrace" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Offline Files" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Windows Defender" /f Ошибка: Отказано в доступе. C:\Users\Alex>reg delete "HKLM\WIM_Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\XblGameSave" /f Ошибка: Отказано в доступе. ---------------------------------------------------------------------------------------------- И еще ошибки выполнения кода: ---------------------------------------------------------------------------------------------- C:\Users\Alex>ECHO Removing capability Removing capability C:\Users\Alex>ECHO ============================================================ ============================================================ C:\Users\Alex>for %%p in (Browser.InternetExplorer) do ( Непредвиденное появление: %%p. C:\Users\Alex>for /f "tokens=3 delims=: " %%a in ('start "" /b dism /image:\WimLocal\Mount" /Get-Capabilities ^| find "Capability Identity" ^| find "%%p"') do ( Непредвиденное появление: %%a. C:\Users\Alex>ECHO Removing %%a Removing %%a C:\Users\Alex>dism /image:\WimLocal\Mount" /Remove-Capability /CapabilityName:"%%a" Cистема DISM Версия: 10.0.26100.1150 Ошибка: 1639 В командной строке отсутствует требуемая команда обслуживания. Для получения дополнительных сведений выполните команду "DISM.exe /Image=<путь_к_автономному_образу> /?", где <путь_к_автономному_образу> - это полный путь к автономному образу Windows. Файл журнала DISM находится по адресу C:\Windows\Logs\DISM\dism.log
Thank you very much, maybe I can send you all the folder. To make it clear what I’m doing there with the install.wim file? Or is the start.cmd file enough for you? Maybe we need to add something else useful here or, on the contrary, remove unnecessary things? Spoiler Code: @echo off TITLE Working with the install.wim image - modified by sainfo TITLE Working with the install.wim IoT Enterprise LTSC 26100.1 en-US image. CLS ECHO. ECHO ============================================================ ECHO Mounting the install.wim image ECHO ============================================================ dism /Mount-Wim /WimFile:D:\WimLocal\install.wim /index:1 /mountdir:D:\WimLocal\mount dism /Image:D:\WimLocal\mount /Add-Package /PackagePath:D:\WimLocal\updates dism /Image:D:\WimLocal\mount /cleanup-image /startcomponentcleanup /resetbase ECHO. ECHO ============================================================ ECHO Saving the image to install.wim ECHO ============================================================ dism /Unmount-Wim /MountDir:D:\WimLocal\Mount /Commit ECHO. ECHO ============================================================ ECHO Mounting the install.wim image ECHO ============================================================ dism /Mount-Wim /WimFile:D:\WimLocal\install.wim /index:1 /mountdir:D:\WimLocal\mount 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 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 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 AppID driver (restriction policies ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\AppID" /v "Start" /t REG_DWORD /d "4" /f >nul ECHO. ECHO ============================================================ ECHO Smartlockerfltr filter driver ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\applockerfltr" /v "Start" /t REG_DWORD /d "4" /f >nul ECHO. ECHO ============================================================ ECHO Windows Container Isolation ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\wcifs" /v "Start" /t REG_DWORD /d "4" /f >nul ECHO. ECHO ============================================================ ECHO Payment decision driver ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\CAD" /v "Start" /t REG_DWORD /d "4" /f >nul ECHO. ECHO ============================================================ ECHO Network monitoring driver - disable ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\Ndu" /v "Start" /t REG_DWORD /d "4" /f >nul ECHO. ECHO ============================================================ ECHO Virtual Render Driver - disable ECHO ============================================================ reg add "HKLM\WIM_SYSTEM\ControlSet001\Services\VirtualRender" /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 Unloading registry keys ECHO ============================================================ reg unload HKLM\WIM_NTUSER 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 D:\WimLocal\tweak.exe /n /p D:\WimLocal\Mount /c Microsoft.Internet-Explorer-Optional-amd64 /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 D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Program Files (x86)\Microsoft D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\WinSxS\Backup D:\WimLocal\SU64.exe /w cmd /c RD /s /q D:\WimLocal\Mount\Windows\WinSxS\ManifestCache 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_SOFTWARE "D:\WimLocal\Mount\Windows\System32\config\SOFTWARE" 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_Software ECHO. ECHO ============================================================ ECHO Removing capability ECHO ============================================================ for %%p in (Browser.InternetExplorer) do ( for /f "tokens=3 delims=: " %%a in ('start "" /b dism /image:D:\WimLocal\Mount" /Get-Capabilities ^| find "Capability Identity" ^| find "%%p"') do ( ECHO Removing %%a dism /image:D:\WimLocal\Mount" /Remove-Capability /CapabilityName:"%%a" ) ) 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 ECHO. ECHO ============================================================ ECHO Removing install.wim in an image ECHO ============================================================ Dism /Image:D:\WimLocal /Remove-install.wim ECHO. ECHO All Finished. ECHO. ECHO Press any key to end the script. ECHO. Pause >nul Exit
no idea why i'm the only one affected by this, but this solved it for me reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve restart explorer after and it should work
Send me your tool folder, I will try to solve your problem tomorrow, as I am at work today and tomorrow
Today I rebuilt my script. Overall everything works well. There are small problems with filling the script, but everything can be solved. Question for the audience: At the end of the script, a new file new_install.wim is created, so I would like to delete the original install.wim file. The temporary folders mount and temp are successfully deleted, but the install.wim file is not deleted. Can anyone tell me the code for the line to delete the install.wim file so that it is deleted at the end of the script? Spoiler Code: This is the end of the script: * * * ECHO. ECHO =========================================================== ECHO Unmount 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 ECHO. ECHO =========================================================== ECHO Delete mount and scratch folders ECHO =========================================================== rd /s /q D:\WimLocal\mount rd /s /q D:\WimLocal\temp rd /s /q D:\WimLocal\install.wim pause exit
Hi, Just add one line. Spoiler ECHO. ECHO =========================================================== ECHO Exporting the image to new_install.wim ECHO =========================================================== DISM /Export-Image /SourceImageFile:\WimLocal\install.wim /SourceIndex:1 /DestinationImageFile:\WimLocal\new_install.wim /Compress:maximum move /y "D:\WimLocal\new_install.wim" "D:\WimLocal\install.wim" >nul
Damn, what is this, it seems like the script passed this place as always, now it says Error: error when accessing the registry. What, why, what is wrong with him again??? Spoiler Code: Here is this part of my code. Error when executing the command: reg import d:\WimLocal\tweak\USER.reg reg load HKLM\WIM_NTUSER D:\WimLocal\Mount\Users\Default\NTUSER.DAT reg import d:\WimLocal\tweak\USER.reg reg unload HKLM\WIM_NTUSER p.s. Here's another problem with this resource: a Russian-speaking person must translate his text into English so that his interlocutor can then translate it back from English into Russian. It is clear that the semantic side of the source text changes so much that both can only guess what the interlocutor wanted to say. Well, I say - it’s some kind of nonsense!