alternative method to block Client.CBS banners

This commit is contained in:
h3r0 2023-12-03 12:19:01 +00:00 committed by GitHub
parent b4e71acfc5
commit b91c9f5506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 1 deletions

View File

@ -65,4 +65,17 @@ for /f "usebackq tokens=2 delims=\" %%a in (`reg query "HKEY_USERS" ^| findstr /
::PowerShell -NoP -C "Import-StartLayout -LayoutPath '!SystemDrive!\Windows\StartMenuLayout.xml' -MountPath $env:SystemDrive\\"
::reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /f
::reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "!SystemDrive!\Windows\StartMenuLayout.xml" /f
::reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "!SystemDrive!\Windows\StartMenuLayout.xml" /f
for %%i in (
"WebExperienceHostApp.exe"
"WebExperienceHost.dll"
"SystemSettingsExtensions.dll"
"WsxPackManager.dll"
) do (
if exist "!SystemDrive!\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\%%i.bak" del /q /f "!SystemDrive!\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\%%i.bak"
if exist "!SystemDrive!\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\%%i" (
ren "!SystemDrive!\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\%%i" "%%i.bak"
)
)