mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-04-23 03:00:50 -04:00
Merge pull request #21 from Conder000/confirmfiledelete
Added EnableFileDeleteConfirmation function
This commit is contained in:
16
Win10.ps1
16
Win10.ps1
@@ -54,6 +54,7 @@ $tweaks = @(
|
||||
"DisableStickyKeys", # "EnableStickyKeys",
|
||||
"ShowTaskManagerDetails" # "HideTaskManagerDetails",
|
||||
"ShowFileOperationsDetails", # "HideFileOperationsDetails",
|
||||
"EnableFileDeleteConfirmation", # "DisableFileDeleteConfirmation",
|
||||
"HideTaskbarSearchBox", # "ShowTaskbarSearchBox",
|
||||
"HideTaskView", # "ShowTaskView",
|
||||
"ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons",
|
||||
@@ -795,6 +796,21 @@ Function HideFileOperationsDetails {
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable file delete confirmation dialog
|
||||
Function EnableFileDeleteConfirmation {
|
||||
Write-Host "Enabling file delete confirmation dialog..."
|
||||
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
|
||||
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ConfirmFileDelete" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Disable file delete confirmation dialog
|
||||
Function DisableFileDeleteConfirmation {
|
||||
Write-Host "Disabling file delete confirmation dialog..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ConfirmFileDelete" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Taskbar Search button / box
|
||||
Function HideTaskbarSearchBox {
|
||||
Write-Host "Hiding Taskbar Search box / button..."
|
||||
|
||||
@@ -44,6 +44,7 @@ DisableLockScreenRS1
|
||||
DisableStickyKeys
|
||||
ShowTaskManagerDetails
|
||||
ShowFileOperationsDetails
|
||||
EnableFileDeleteConfirmation
|
||||
HideTaskbarSearchBox
|
||||
HideTaskView
|
||||
ShowSmallTaskbarIcons
|
||||
|
||||
@@ -44,6 +44,7 @@ EnableLockScreenRS1
|
||||
EnableStickyKeys
|
||||
HideTaskManagerDetails
|
||||
HideFileOperationsDetails
|
||||
DisableFileDeleteConfirmation
|
||||
ShowTaskbarSearchBox
|
||||
ShowTaskView
|
||||
ShowLargeTaskbarIcons
|
||||
|
||||
@@ -44,6 +44,7 @@ DisableLockScreenRS1
|
||||
DisableStickyKeys
|
||||
ShowTaskManagerDetails
|
||||
ShowFileOperationsDetails
|
||||
EnableFileDeleteConfirmation
|
||||
HideTaskbarSearchBox
|
||||
HideTaskView
|
||||
ShowSmallTaskbarIcons
|
||||
|
||||
@@ -44,6 +44,7 @@ EnableLockScreenRS1
|
||||
EnableStickyKeys
|
||||
HideTaskManagerDetails
|
||||
HideFileOperationsDetails
|
||||
DisableFileDeleteConfirmation
|
||||
ShowTaskbarSearchBox
|
||||
ShowTaskView
|
||||
ShowLargeTaskbarIcons
|
||||
|
||||
Reference in New Issue
Block a user