This repository was archived by the owner on May 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ DisableAccessibilityKeys # EnableAccessibilityKeys
102
102
ShowTaskManagerDetails # HideTaskManagerDetails
103
103
ShowFileOperationsDetails # HideFileOperationsDetails
104
104
# EnableFileDeleteConfirm # DisableFileDeleteConfirm
105
+ # DisableRecycleFiles # EnableRecycleFiles
105
106
HideTaskbarSearch # ShowTaskbarSearchIcon # ShowTaskbarSearchBox
106
107
HideTaskView # ShowTaskView
107
108
ShowSmallTaskbarIcons # ShowLargeTaskbarIcons
Original file line number Diff line number Diff line change @@ -1556,6 +1556,22 @@ Function DisableFileDeleteConfirm {
1556
1556
Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" - Name " ConfirmFileDelete" - ErrorAction SilentlyContinue
1557
1557
}
1558
1558
1559
+ # Disable file recycling. Delete files for real.
1560
+ # Needs admin privileges, as for some interesting reason it is required for this key.
1561
+ Function DisableRecycleFiles {
1562
+ Write-Output " Disable file recycling..."
1563
+ If (! (Test-Path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" )) {
1564
+ New-Item - Path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
1565
+ }
1566
+ Set-ItemProperty - Path " HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" - Name " NoRecycleFiles" - Type DWord - Value 1
1567
+ }
1568
+
1569
+ # Reverts change of 'DisableRecycleFiles'. Allow moving files into recycle bin.
1570
+ Function EnableRecycleFiles {
1571
+ Write-Output " Enable file recycling..."
1572
+ Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" - Name " NoRecycleFiles" - ErrorAction SilentlyContinue
1573
+ }
1574
+
1559
1575
# Hide Taskbar Search icon / box
1560
1576
Function HideTaskbarSearch {
1561
1577
Write-Output " Hiding Taskbar Search icon / box..."
You can’t perform that action at this time.
0 commit comments