Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Better ReadMe + New Functions + Start Batch #261

Merged
merged 6 commits into from
Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Individual Scripts/Clear Last Used Files and Folders.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Write-Host "Clear last used files and folders"
Remove-Item %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms -FORCE -ErrorAction SilentlyContinue
14 changes: 14 additions & 0 deletions Individual Scripts/Disable Last Used Files and Folders View.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$Keys = @(

# Deactivate showing of last used files
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}"

# Deactivate showing of last used folders
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}"
)

#This writes the output of each key it is removing and also removes the keys listed above.
ForEach ($Key in $Keys) {
Write-Output "Removing $Key from registry"
Remove-Item $Key -Recurse
}
26 changes: 26 additions & 0 deletions Individual Scripts/Revert Changes
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,29 @@
#Enabling the Diagnostics Tracking Service
Set-Service "DiagTrack" -StartupType Automatic
Start-Service "DiagTrack"

# # Re-Enable the showing of last used files and folders (luff)
# Write-Output "Re-enabling keys to show last used files and folders"
# $luffKeys = @(
# "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}"
# "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}"
# )
# ForEach ($luffKey in $luffKeys) {
# If (! (Test-Path $lastUsedFiles)) {
# Write-Output "Adding $luffKey to registry"
# New-Item $luffKey
# }
# }
# Write-Output "Re-enabling explorer to show last used files and folders"
# $explorerLastUsed = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
# Set-ItemProperty $explorerLastUsed HubMode -Value 0
#
# # Re-Enable AeroShake
# Write-Output "Re-enabling AeroShake"
# $aeroShake = "HKCU:\Software\Policies\Microsoft\Windows\Explorer"
# Set-ItemProperty $aeroShake NoWindowMinimizingShortcuts -Value 0
#
# # Re-Locate Explorer LaunchTo
# Write-Output "Re-Locate the Explorers Launch To (Entry Point)"
# $LaunchTo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
# Set-ItemProperty $LaunchTo LaunchTo -Value 2
9 changes: 9 additions & 0 deletions Individual Scripts/Set Explorers LaunchTo Computer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# "This Computer"-Button starts the explorer on the following path:
# LaunchTo Value Description
# 1 Computer (Harddrives, Network, etc.)
# 2 Fast Access
# 3 Downloads (The Download-Folder)

Write-Host "Set Explorers Entry Point"
$LaunchTo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
Set-ItemProperty $LaunchTo LaunchTo -Value 1
30 changes: 26 additions & 4 deletions Windows10Debloater.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@ Function Restore3dObjects {
}
}

#Function DisableLastUsedFilesAndFolders {
# Write-Host = "Disable Explorer to show last used files and folders."
# Invoke-Item (start powershell ((Split-Path $MyInvocation.InvocationName) + "\Individual Scripts\Disable Last Used Files and Folders View.ps1"))
#}

#Interactive prompt Debloat/Revert options
$Button = [Windows.MessageBoxButton]::YesNoCancel
$ErrorIco = [Windows.MessageBoxImage]::Error
Expand All @@ -772,6 +777,11 @@ $Reboot = "For some of the changes to properly take effect it is recommended to
$OneDriveDelete = "Do you want to uninstall One Drive?"
$Unpin = "Do you want to unpin all items from the Start menu?"
$InstallNET = "Do you want to install .NET 3.5?"
$LastUsedFilesFolders = "Do you want to hide last used files and folders in Explorer?"
$LastUsedFilesFolders2 = "Do you want to show last used files and folders in Explorer?"
$ClearLastUsedFilesFolders = "Do you want to clear last used files and folders?"
$AeroShake = "Do you want to disable AeroShake?"
$AeroShake2 = "Do you want to re-enable AeroShake?"
$Prompt1 = [Windows.MessageBox]::Show($Ask, "Debloat or Revert", $Button, $ErrorIco)
Switch ($Prompt1) {
#This will debloat Windows 10
Expand Down Expand Up @@ -897,9 +907,21 @@ Switch ($Prompt1) {
Write-Host "Skipping .NET install."
}
}
# #Prompt asking if you want to deactivate Last Used Files and Folders
# $Prompt7 = [Windows.MessageBox]::Show($LastUsedFilesFolders, "Deactivate Last Used Files and Folders", $Button, $Warn)
# Switch ($Prompt7) {
# Yes {
# DisableLastUsedFilesAndFolders
# Write-Host "Last Used Files and Folders will no longer been shown!"
# }
# No {
# Write-Host "Skipping Hiding Last used Files and Folders."
# }
# }

#Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) {
$Prompt0 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt0) {
Yes {
Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Expand Down Expand Up @@ -937,8 +959,8 @@ Switch ($Prompt1) {
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) {
$Prompt0 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt0) {
Yes {
Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Expand Down