Merge pull request #261 from Norrodar/master

Better ReadMe + New Functions + Start Batch
pull/395/head
Richard Newton 3 years ago committed by GitHub
commit 79e8f395d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

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

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

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

Loading…
Cancel
Save