Skip to content

Instantly share code, notes, and snippets.

@Technetium1
Last active August 6, 2020 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Technetium1/57c1801e50c7f4b85f5efe113e9b404b to your computer and use it in GitHub Desktop.
Save Technetium1/57c1801e50c7f4b85f5efe113e9b404b to your computer and use it in GitHub Desktop.
I fucking hate Windows so much. This will fail because permanence is set to permanent in the manifest for KB4559309. This tool was inspired by the garbage at https://docs.microsoft.com/en-us/deployedge/microsoft-edge-blocker-toolkit
@ECHO off
ECHO MICROSOFT EDGE IS FUCKING GARBAGE! LET'S GET RID OF IT FOREVER!
ECHO
SLEEP 1
goto admincheck
:admincheck
ECHO CHECKING FOR ADMIN PERMISSION TO CONTINUE!
net session >nul 2>&1
if %errorLevel% == 0 (
echo Continuing...
echo .
) else (
echo YOU MUST RIGHT CLICK AND RUN AS ADMINISTRATOR FOR PERMISSION!
pause
exit
)
set REGBlockKey=HKLM\SOFTWARE\Microsoft\EdgeUpdate
set REGBlockValue=DoNotUpdateToEdgeWithChromium
ECHO Blocking deployment of bullshit via Registry
REG ADD "\\.\%REGBlockKey%" /v %REGBlockValue% /t REG_DWORD /d 1 /f
SLEEP 1
ECHO Next up...
ECHO .
ECHO Attempting forced removal of KB4559309 with WUSA.
ECHO This may fail, but don't worry, we'll kill it with fire soon...
wusa /uninstall /kb:4559309 /quiet /norestart
ECHO Next up...
ECHO .
SLEEP 1
ECHO Downloading https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc
ECHO We cannot get a direct download link because MS sucks, so it was spitefully reuploaded to https://0x0.st/i3je.zip
ECHO Reuploaded file was last updated on 4/4/2017
ECHO .
SLEEP 1
ECHO Downloading https://0x0.st/i3je.zip to %TEMP%\PSWindowsUpdate.zip
powershell -Command "Invoke-WebRequest https://0x0.st/i3je.zip -OutFile %TEMP%\PSWindowsUpdate.zip"
ECHO Next up...
ECHO .
SLEEP 1
ECHO Extracting file to %TEMP%\PSWindowsUpdate
powershell -Command "Expand-Archive -Force %TEMP%\PSWindowsUpdate.zip %TEMP%"
ECHO Next up...
ECHO .
SLEEP 1
ECHO Importing PSWindowsUpdate, so we can uninstall then hide KB4559309.
ECHO YOU ARE ABOUT TO BE ASKED "Are you sure you want to perform this action?"
ECHO Choose "Y" or "A" and hit ENTER to confirm!
ECHO .
powershell -NoProfile -ExecutionPolicy Bypass -Command "& {set-location '%TEMP%'; Import-Module -Name .\PSWindowsUpdate; Get-WUUninstall -KBArticleID KB4559309; Hide-WUUpdate -KBArticleID KB4559309; Set-ExecutionPolicy Bypass;}"
ECHO Congratulations! Chemotherapy is now complete - you no will no longer have cancer after the next reboot!
SLEEP 1
ECHO Press any key to exit :)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment