-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbloatware.bat
41 lines (29 loc) · 1.41 KB
/
bloatware.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
setlocal enabledelayedexpansion
echo Listing currently installed apps (*DO NOT UNINSTALL ANY APP, IF YOU AREN'T SURE WHAT IT DOES.*)...
echo --------------------------------------------------------
for /f "tokens=2,*" %%A in ('reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" /s ^| findstr DisplayName') do (
set "appKey=%%A"
set "appDisplayName=%%B"
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\!appKey!" /v SystemComponent >nul 2>&1
if errorlevel 1 (
echo [!appKey!] !appDisplayName!
)
)
echo --------------------------------------------------------
echo.
set "uninstallApps="
set /p "uninstallApps=Enter the app(s) you want to uninstall (comma-separated, leave blank to move on): "
if not "%uninstallApps%"=="" (
for %%A in ("%uninstallApps:,=" "%") do (
:: Uninstall each app
echo Uninstalling %%~A...
start /wait "" powershell.exe -Command "Get-WmiObject -Query \"SELECT * FROM Win32_Product WHERE Name LIKE '%%~A%%'\" | ForEach-Object { $_.Uninstall() }"
echo Uninstalled %%~A.
timeout 2 > nul
start "Disabling transparency effects, to improve performance." DisableTransparencyEffects.bat
)
)
echo No problem, moving on...
timeout 2 > nul
start "Disabling transparency effects, to improve performance." DisableTransparencyEffects.bat