Merge pull request #261 from Norrodar/master

Better ReadMe + New Functions + Start Batch
This commit is contained in:
Richard Newton 2021-03-20 13:43:18 -04:00 committed by GitHub
commit 79e8f395d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 4 deletions

View File

@ -0,0 +1,2 @@
Write-Host "Clear last used files and folders"
Remove-Item %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms -FORCE -ErrorAction SilentlyContinue

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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