Finally Talking about JoeyDebloat





I think we all have our laundry list of crap to do when setting up Windows. Install Chrome, some tools, do what you can to make Windows Update and all of the other notifications get out of your face. Some might even go as far as to install LTSC (and you probably should, even if M$ doesn’t want you to).

When you use Windows long enough, that list can get big. And I’ve been using Windows for a long, long time now. At least 22 years. Combine that with the mountain of useless, half-baked crap that gets added every year and it’s very easy to have the tweaks and installs take DAYS if done manually.

The Path Tread Before

My efforts to stop retreading ground didn’t start with debloating. It started when I had a fleet of student devices to deploy as a Research Assistant in grad school. I had already considered plenty of other solutions before rolling my own:

Why So Complicated

There are probably hundreds of Windows debloat tools out there at this point. I’m not going to even try to list them all. But there’s been some patterns I’ve noticed that feel very counterproductive:

MiniWinDeploy: A Simple Basis

That leads me to the first part of my debloat empire: MiniWinDeploy. I’m just gonna copy my description here because I think it explains it well:

Stupid simple task runner, intended for deploying/debloating/customizing Windows

The following filetypes are recognized:

  • bat: Runs batch script and waits until exit.

  • exe: Runs executable and waits until exit.

  • lnk: Executes shortcut and waits for process to exit.

  • msi: Executes MSI installer silently and waits until finished. Cancels restarts.

  • ps1: Runs Powershell script and waits until exit.

  • reg: Applies registry patch.

  • xml: For XML files beginning with “Wi-Fi-”, registers the wireless profiles. Ignores other XML files.

Assume we have the following directory structure in the current working directory and that the current PC model name (as specified in System Information) is modelname:

- All
|-- 1
  |-- hello.bat
|-- 9
  |-- world.bat
- Models
|-- modelname
  |-- 5
    |-- model.bat

The following tasks will be executed, in order:

All/1/hello.bat
Models/modelname/5/model.bat
All/9/world.bat

All folders in All and Models/modelname are added to a pool, sorted naturally, and then the contents of each directory are executed (after also being naturally sorted). If the modelname directory isn’t present, the script will proceed with a warning.

Yes, that is all it does. (Well okay it writes a log too.) It runs executables and applies “tweak files” in the way that makes the most sense for unattended use. The script is 331 LOC that hasn’t been touched in over 2 years. Which is a good thing, because it still works perfect. All of the actual tweaks are kept in a separate repository…

JoeyDebloat

Despite the name “JoeyDebloat” the repo has turned into more of a tweak compilation. However, I think these tweaks will be welcomed by most, and for those who aren’t pleased with what it does will instead be pleased by how easy it is to modify.

Some will be familiar with the irm | iex Powershell pattern that allows scripts to be hosted at a URL and be quickly executed with a one-liner. Probably the Most famous example are the Microsoft Activation Scripts. (Side note: I have no idea why Microsoft hasn’t cracked down on either of these things.)

⚠️ WARNING: irm | iex will IMMEDIATELY execute code from the internet on your computer with the permissions of whatever shell you execute it in. It will not respect ExecutionPolicy, it will not warn you about it being unsafe, it will just GO.

My goal was to use this pattern to make a one-liner that I could memorize easily. So, my repo contains a script which GitHub Actions deploys to the root of a GitHub Pages website, making it so you can just do this:

irm http://jojudge.com/joeydebloat | iex

41 characters, not bad! You should read the contents of the script before running something like this. In this case, it will prompt you before making any changes to your system. Quoting once again:

This will install Chocolatey, Python 3, Git, and the miniwindeploy Python package. It then clones this repo (JoeyDebloat) and opens it in File Explorer. From there, change whatever scripts you’d like, then open Start.bat.

To be clear, when this script has finished running the only thing it will have done is install the aforementioned programs. No debloating/tweaking has been done yet. It will open file explorer, but before clicking Start.bat you may want to explore the All folder to see what exactly it’s going to do to your system.

This is the best part about this approach: if you don’t like a tweak, you just delete it. It uses your existing knowledge of using file explorer to subvert the need for a GUI. On the other side, if I ever want to add a tweak, I can just drop it into the repo as a file. And if you want to stay posted with what I’ve been changing, you can just check the commit history. Why reinvent the wheel when you already have all the tools?

So, okay, what does this actually do? Well, if I listed everything we’d be here for hours and I’m also not gonna keep this article up to date. I was gonna do a brief overview but I don’t even think that’s worth it. Each tweak is titled with a description of what it will do, and to make things a bit easier to parse I’ve moved the more opinionated tweaks into separate folders. The general pattern is this: make Windows as quiet and well-behaved as possible, then add programs that I’m bound to download eventually.

You may have come to this article with the express interest of seeing what the debloat actually does. I think for people really interested in doing this, knowing how to efficiently maintain a tweak library themselves is going to be significantly more useful than relying on some random dude with no incentive to tailor their tweaks to everyone’s lifestyle.

:fork:

So you want to add your own tweaks. Or you want to suggest ones to add to my repo. Get on your GitHub account and fork the repo. After that, you’ll have a couple things to change:

You’ll still need to know how to use Git in order to maintain this, but if that’s not in your wheelhouse then maintaining this might not be either.

tldr

Shoutout to



Comments are currently disabled.


Enable Comments

By enabling comments, you agree to allow this website to connect to Cusdis and to the Cusdis Privacy Policy.