Negative Number > Small Script Collection
An assortment of small bash/powershell/bat scripts that I use that others may find useful.
Steam Install Killer
Whenever Steam installs something it adds a registry uninstall entry. I consider this stupid since Steam installs are otherwise portable.
Here’s a small batchfile that removes all of these. Save as .bat, run as administrator and optionally add as a scheduled task.
@net session >nul 2>&1 @if %errorlevel% == 0 ( @for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f @for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f @echo Success! @pause>nul ) else ( @echo This script can't do anything unless it's ran as an administrator. @pause>nul )
Debian In A Hurry
Running Windows 10? Want WSL and a Debian environment installed right this instant? Running LTE and can’t manually pull the installer off the store? Either way, here’s a script that enables WSL, pulls the debian image, installs it to C:/Debian and adds a desktop shortcut.
Paste this into an admin powershell and wait for the bars to fill.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://www.negativenumber.com/assets/wsl_install_deb.ps1'))
This will leave a shortcut to Debian on your desktop. You’ll need to reboot if WSL wasn’t previously enabled.
To remove, just delete C:/debian and the shortcut and optionally turn off WSL in the Windows Features panel if you don’t plan to use it for anything else.