Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/builtbybel/Flyby11
Browse files Browse the repository at this point in the history
  • Loading branch information
Belim committed Oct 30, 2024
2 parents 9ff59e1 + 655ad8f commit b8a8fa5
Show file tree
Hide file tree
Showing 11 changed files with 392 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/ChrisTitusApp.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
irm christitus.com/win | iex
16 changes: 16 additions & 0 deletions plugins/Clear Icon Cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"PlugID": "Clear Icon Cache",
"PlugInfo": "This feature clears the icon cache in Windows to resolve issues with icons displaying incorrectly.",
"PlugCheck": [],
"PlugCategory": "Tweaks (Plugins)",
"PlugDo": [
"ie4uinit.exe -show",
"taskkill /IM explorer.exe /F",
"DEL /A /Q \"%localappdata%\\IconCache.db\"",
"DEL /A /F /Q \"%localappdata%\\Microsoft\\Windows\\Explorer\\iconcache*\"",
"Start explorer.exe"
],
"PlugUndo": [
"powershell -Command \"Write-Output 'There is no undo operation for clearing the icon cache.'\""
]
}
37 changes: 37 additions & 0 deletions plugins/Create Restore Point.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Run as Admin
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You need to run this script as an Administrator!"
exit
}

# Load Windows Forms assembly for MessageBox
Add-Type -AssemblyName System.Windows.Forms

# Define the restore point description and type
$description = "Flyby11 Restore Point"
$restorePointType = 12 # MODIFY_SETTINGS = 12

# Function to create restore point with progress reporting
function Create-RestorePoint {
Write-Host "Starting to create restore point..." -ForegroundColor Yellow

# Simulate progress
for ($i = 0; $i -le 100; $i += 10) {
Write-Progress -Activity "Creating Restore Point" -Status "$i% Complete" -PercentComplete $i
Start-Sleep -Milliseconds 300 # Simulate some work being done
}

# WMI query to create the restore point
$restorePoint = Get-WmiObject -List Win32_SystemRestore | ForEach-Object {
$_.CreateRestorePoint($description, $restorePointType, 100)
}

Write-Host "Restore point created successfully." -ForegroundColor Green

# Show completion message
[System.Windows.Forms.MessageBox]::Show("Restore point has been created successfully!", "Completion", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)
}

# Execute the restore point creation
Create-RestorePoint
20 changes: 20 additions & 0 deletions plugins/File Extensions Visibility.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"PlugID": "Hide Hidden File Extensions",
"PlugInfo": "This feature shows or hides hidden file extensions in Windows Explorer.",
"PlugCategory": "Tweaks (Plugins)",
"PlugCheck": [
"reg query HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v HideFileExt"
],
"PlugDo": [
"reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v HideFileExt /t REG_DWORD /d 1 /f",
"reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v ShowSuperHidden /t REG_DWORD /d 0 /f",
"taskkill /f /im explorer.exe",
"start explorer.exe"
],
"PlugUndo": [
"reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v HideFileExt /t REG_DWORD /d 0 /f",
"reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v ShowSuperHidden /t REG_DWORD /d 1 /f",
"taskkill /f /im explorer.exe",
"start explorer.exe"
]
}
172 changes: 172 additions & 0 deletions plugins/Remove default apps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Description:
# This script removes unwanted Apps that come with Windows. If you do not want
# to remove certain Apps comment out the corresponding lines below.

Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1

Write-Output "Elevating privileges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)

Write-Output "Uninstalling default apps"
$apps = @(
# default Windows 10 apps
"Microsoft.549981C3F5F10" #Cortana
"Microsoft.3DBuilder"
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingTranslator"
"Microsoft.BingWeather"
#"Microsoft.FreshPaint"
"Microsoft.GamingServices"
"Microsoft.Microsoft3DViewer"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.MicrosoftSolitaireCollection"
#"Microsoft.MicrosoftStickyNotes"
"Microsoft.MinecraftUWP"
"Microsoft.NetworkSpeedTest"
"Microsoft.Office.OneNote"
"Microsoft.People"
"Microsoft.Print3D"
"Microsoft.SkypeApp"
"Microsoft.Wallet"
#"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
#"Microsoft.WindowsCalculator"
"Microsoft.WindowsCamera"
"microsoft.windowscommunicationsapps"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore" # can't be re-installed
"Microsoft.Xbox.TCUI"
"Microsoft.XboxApp"
"Microsoft.XboxGameOverlay"
"Microsoft.XboxGamingOverlay"
"Microsoft.XboxSpeechToTextOverlay"
"Microsoft.YourPhone"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"Microsoft.SkypeApp"
"Clipchamp.Clipchamp"

# Threshold 2 apps
"Microsoft.CommsPhone"
"Microsoft.ConnectivityStore"
"Microsoft.GetHelp"
"Microsoft.Getstarted"
"Microsoft.Messaging"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.WindowsFeedbackHub"

# Creators Update apps
"Microsoft.Microsoft3DViewer"
#"Microsoft.MSPaint"

#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingHealthAndFitness"
"Microsoft.BingTravel"
"Microsoft.WindowsReadingList"

# Redstone 5 apps
"Microsoft.MixedReality.Portal"
"Microsoft.ScreenSketch"
"Microsoft.XboxGamingOverlay"

# non-Microsoft
"2FE3CB00.PicsArt-PhotoStudio"
"46928bounde.EclipseManager"
"4DF9E0F8.Netflix"
"613EBCEA.PolarrPhotoEditorAcademicEdition"
"6Wunderkinder.Wunderlist"
"7EE7776C.LinkedInforWindows"
"89006A2E.AutodeskSketchBook"
"9E2F88E3.Twitter"
"A278AB0D.DisneyMagicKingdoms"
"A278AB0D.MarchofEmpires"
"ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
"CAF9E577.Plex"
"ClearChannelRadioDigital.iHeartRadio"
"D52A8D61.FarmVille2CountryEscape"
"D5EA27B7.Duolingo-LearnLanguagesforFree"
"DB6EA5DB.CyberLinkMediaSuiteEssentials"
"DolbyLaboratories.DolbyAccess"
"DolbyLaboratories.DolbyAccess"
"Drawboard.DrawboardPDF"
"Facebook.Facebook"
"Fitbit.FitbitCoach"
"Flipboard.Flipboard"
"GAMELOFTSA.Asphalt8Airborne"
"KeeperSecurityInc.Keeper"
"NORDCURRENT.COOKINGFEVER"
"PandoraMediaInc.29680B314EFC2"
"Playtika.CaesarsSlotsFreeCasino"
"ShazamEntertainmentLtd.Shazam"
"SlingTVLLC.SlingTV"
"SpotifyAB.SpotifyMusic"
"ThumbmunkeysLtd.PhototasticCollage"
"TuneIn.TuneInRadio"
"WinZipComputing.WinZipUniversal"
"XINGAG.XING"
"flaregamesGmbH.RoyalRevolt2"
"king.com.*"
"king.com.BubbleWitch3Saga"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
"BytedancePte.Ltd.TikTok"
"Facebook.InstagramBeta"

# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
)

$appxprovisionedpackage = Get-AppxProvisionedPackage -Online

foreach ($app in $apps) {
Write-Output "Trying to remove $app"

Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers

($appxprovisionedpackage).Where( {$_.DisplayName -EQ $app}) |
Remove-AppxProvisionedPackage -Online
} Write-Host "Clippy has completed the process and removed all possible apps."

# Prevents Apps from re-installing
$cdm = @(
"ContentDeliveryAllowed"
"FeatureManagementEnabled"
"OemPreInstalledAppsEnabled"
"PreInstalledAppsEnabled"
"PreInstalledAppsEverEnabled"
"SilentInstalledAppsEnabled"
"SubscribedContent-314559Enabled"
"SubscribedContent-338387Enabled"
"SubscribedContent-338388Enabled"
"SubscribedContent-338389Enabled"
"SubscribedContent-338393Enabled"
"SubscribedContentEnabled"
"SystemPaneSuggestionsEnabled"
)

New-FolderForced -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
foreach ($key in $cdm) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" $key 0
}

New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" "AutoDownload" 2

# Prevents "Suggested Applications" returning
New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1
31 changes: 31 additions & 0 deletions plugins/Resore all built-in apps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Get all installed Windows apps for all users
$allApps = Get-AppxPackage -AllUsers

# Counter for tracking progress
$totalApps = $allApps.Count
$currentAppIndex = 1
$reinstalledCount = 0

# Loop through each app and reinstall
foreach ($app in $allApps) {
# Display current status
Write-Host "[$currentAppIndex / $totalApps] Reinstalling $($app.Name)..." -ForegroundColor Yellow

# Try to reinstall the app
try {
Add-AppxPackage -Register "$($app.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode -ErrorAction Stop
Write-Host "[$currentAppIndex / $totalApps] $($app.Name) reinstalled successfully." -ForegroundColor Green
$reinstalledCount++
} catch {
Write-Host "[$currentAppIndex / $totalApps] Error occurred while reinstalling $($app.Name): $_" -ForegroundColor Red
}

# Increment the counter
$currentAppIndex++
}

# Display final status
if ($reinstalledCount -eq $totalApps) {
Write-Host "All apps reinstalled successfully." -ForegroundColor Green
Write-Host "Flyby11 has reinstalled everything possible." -ForegroundColor Cyan
}
18 changes: 18 additions & 0 deletions plugins/Restart Explorer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Function to show a message box
function Show-MessageBox {
param (
[string]$message,
[string]$title = "Information"
)
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show($message, $title)
}

# Stop Windows Explorer
Stop-Process -Name explorer -Force

# Start Windows Explorer
Start-Process explorer

# Show message box
Show-MessageBox -message "Windows Explorer has been restarted successfully." -title "Flyby11"
60 changes: 60 additions & 0 deletions plugins/Uninstall OneDrive.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\force-mkdir.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1

Write-Output "Kill OneDrive process"
taskkill.exe /F /IM "OneDrive.exe"
taskkill.exe /F /IM "explorer.exe"

Write-Output "Remove OneDrive"
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") {
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
}
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") {
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall
}

Write-Output "Removing OneDrive leftovers"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp"
# check if directory is empty before removing:
If ((Get-ChildItem "$env:userprofile\OneDrive" -Recurse | Measure-Object).Count -eq 0) {
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:userprofile\OneDrive"
}

Write-Output "Disable OneDrive via Group Policies"
force-mkdir "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive"
Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" "DisableFileSyncNGSC" 1

Write-Output "Remove Onedrive from explorer sidebar"
New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR"
mkdir -Force "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
Set-ItemProperty "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0
mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
Set-ItemProperty "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0
Remove-PSDrive "HKCR"

# Thank you Matthew Israelsson
Write-Output "Removing run hook for new users"
reg load "hku\Default" "C:\Users\Default\NTUSER.DAT"
reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
reg unload "hku\Default"

Write-Output "Removing startmenu entry"
Remove-Item -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"

Write-Output "Removing scheduled task"
Get-ScheduledTask -TaskPath '\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false

Write-Output "Restarting explorer"
Start-Process "explorer.exe"

Write-Output "Waiting for explorer to complete loading"
Start-Sleep 10

Write-Output "Removing additional OneDrive leftovers"
foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) {
Takeown-Folder $item.FullName
Remove-Item -Recurse -Force $item.FullName
}
Write-Output "Flyby11 can confirm the uninstallation of the OneDrive app."
12 changes: 12 additions & 0 deletions plugins/Windows Old Remover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"PlugID": "Windows Old Remover",
"PlugInfo": "The Windows Old Remover plugin allows users to easily remove the 'Windows.old' folder, which contains files from a previous Windows installation. After upgrading to a new version of Windows, the 'Windows.old' folder may occupy significant disk space. This plugin utilizes the DISM command to safely delete this folder, freeing up valuable storage on your system. Please note that once this folder is deleted, you will no longer be able to revert to the previous Windows version through the Recovery options.\n\n**Error Handling**: If you encounter 'Error 1168' during the removal process, it means the 'Windows.old' folder has already been deleted or is not available for rollback. Ensure you have backups before proceeding!",
"PlugCheck": [],
"PlugCategory": "System (Plugins)",
"PlugDo": [
"cmd.exe /c DISM /Online /Remove-OSUninstall"
],
"PlugUndo": [
"powershell -Command \"Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('No undo is available for this deletion. To restore files, use a backup solution.', 'Info', [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)\""
]
}
13 changes: 13 additions & 0 deletions plugins/Windows Rollback Timer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"PlugID": "Windows Rollback Timer",
"PlugInfo": "This plugin checks and sets the uninstall window for reverting to a previous Windows version after an upgrade. The time frame can be configured up to 60 days. After a Windows upgrade (e.g., via Windows Update to version 1803), a copy of the previous Windows version is stored in the 'Windows.old' folder. This allows users to return to the prior version through the 'Recovery' option under 'Update & Security' in Windows Settings. By default, this rollback option is available for only 10 days, provided the 'Windows.old' folder hasn’t been deleted. However, this time frame can be extended up to 60 days using this plugin. \n\n**Error Handling**: If 'Error 1168' appears when attempting to set the rollback period, this indicates that the 'Windows.old' folder has been deleted, making a rollback impossible.",
"PlugCheck": [],
"PlugCategory": "System (Plugins)",
"PlugDo": [
"cmd.exe /c DISM /Online /Get-OSUninstallWindow",
"cmd.exe /c DISM /Online /Set-OSUninstallWindow /Value:60"
],
"PlugUndo": [
"powershell -Command \"Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('No undo is available for this rollback time setting. To change it, please use DISM with a new value.', 'Info', [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)\""
]
}
Loading

0 comments on commit b8a8fa5

Please sign in to comment.