diff --git a/Individual Scripts/Clear Last Used Files and Folders.ps1 b/Individual Scripts/Clear Last Used Files and Folders.ps1 new file mode 100644 index 0000000..3c1e4e8 --- /dev/null +++ b/Individual Scripts/Clear Last Used Files and Folders.ps1 @@ -0,0 +1,2 @@ +Write-Host "Clear last used files and folders" + Remove-Item %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms -FORCE -ErrorAction SilentlyContinue \ No newline at end of file diff --git a/Individual Scripts/Disable Last Used Files and Folders View.ps1 b/Individual Scripts/Disable Last Used Files and Folders View.ps1 new file mode 100644 index 0000000..356a509 --- /dev/null +++ b/Individual Scripts/Disable Last Used Files and Folders View.ps1 @@ -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 + } \ No newline at end of file diff --git a/Individual Scripts/Revert Changes b/Individual Scripts/Revert Changes index e52504a..348c1bd 100644 --- a/Individual Scripts/Revert Changes +++ b/Individual Scripts/Revert Changes @@ -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 diff --git a/Individual Scripts/Set Explorers LaunchTo Computer.ps1 b/Individual Scripts/Set Explorers LaunchTo Computer.ps1 new file mode 100644 index 0000000..b739c4f --- /dev/null +++ b/Individual Scripts/Set Explorers LaunchTo Computer.ps1 @@ -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 \ No newline at end of file diff --git a/Windows10Debloater.ps1 b/Windows10Debloater.ps1 index 23651c5..c69523c 100644 --- a/Windows10Debloater.ps1 +++ b/Windows10Debloater.ps1 @@ -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 @@ -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 @@ -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 @@ -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