@@ -872,13 +872,13 @@ Function EnableRecoveryAndReset {
872872 reagentc / enable 2>&1 | Out-Null
873873}
874874
875- # Set Data Execution Prevention (DEP) policy to OptOut
875+ # Set Data Execution Prevention (DEP) policy to OptOut (Turn on DEP for all programs and services except selected)
876876Function SetDEPOptOut {
877877 Write-Output " Setting Data Execution Prevention (DEP) policy to OptOut..."
878878 bcdedit / set ` {current` } nx OptOut | Out-Null
879879}
880880
881- # Set Data Execution Prevention (DEP) policy to OptIn
881+ # Set Data Execution Prevention (DEP) policy to OptIn (Turn on DEP for essential Windows programs and services only)
882882Function SetDEPOptIn {
883883 Write-Output " Setting Data Execution Prevention (DEP) policy to OptIn..."
884884 bcdedit / set ` {current` } nx OptIn | Out-Null
@@ -2115,17 +2115,17 @@ Function HideThisPCFromDesktop {
21152115 Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {20D04FE0-3AEA-1069-A2D8-08002B30309D}" - ErrorAction SilentlyContinue
21162116}
21172117
2118- # Show Control panel shortcut on desktop
2119- Function ShowControlPanelOnDesktop {
2120- Write-Output " Showing Control panel shortcut on desktop..."
2118+ # Show User Folder shortcut on desktop
2119+ Function ShowUserFolderOnDesktop {
2120+ Write-Output " Showing User Folder shortcut on desktop..."
21212121 If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" )) {
21222122 New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Force | Out-Null
21232123 }
2124- Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0 }" - Type DWord - Value 0
2124+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {59031a47-3f72-44a7-89c5-5595fe6b30ee }" - Type DWord - Value 0
21252125 If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" )) {
21262126 New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Force | Out-Null
21272127 }
2128- Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0 }" - Type DWord - Value 0
2128+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {59031a47-3f72-44a7-89c5-5595fe6b30ee }" - Type DWord - Value 0
21292129}
21302130
21312131# Hide User Folder shortcut from desktop
@@ -2135,10 +2135,17 @@ Function HideUserFolderFromDesktop {
21352135 Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {59031a47-3f72-44a7-89c5-5595fe6b30ee}" - ErrorAction SilentlyContinue
21362136}
21372137
2138- # Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs
2139- Function HideDesktopFromThisPC {
2140- Write-Output " Hiding Desktop icon from This PC..."
2141- Remove-Item - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" - Recurse - ErrorAction SilentlyContinue
2138+ # Show Control panel shortcut on desktop
2139+ Function ShowControlPanelOnDesktop {
2140+ Write-Output " Showing Control panel shortcut on desktop..."
2141+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" )) {
2142+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Force | Out-Null
2143+ }
2144+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" - Type DWord - Value 0
2145+ If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" )) {
2146+ New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Force | Out-Null
2147+ }
2148+ Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" - Type DWord - Value 0
21422149}
21432150
21442151# Hide Control panel shortcut from desktop
@@ -2148,17 +2155,10 @@ Function HideControlPanelFromDesktop {
21482155 Remove-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" - ErrorAction SilentlyContinue
21492156}
21502157
2151- # Show User Folder shortcut on desktop
2152- Function ShowUserFolderOnDesktop {
2153- Write-Output " Showing User Folder shortcut on desktop..."
2154- If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" )) {
2155- New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Force | Out-Null
2156- }
2157- Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" - Name " {59031a47-3f72-44a7-89c5-5595fe6b30ee}" - Type DWord - Value 0
2158- If (! (Test-Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" )) {
2159- New-Item - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Force | Out-Null
2160- }
2161- Set-ItemProperty - Path " HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" - Name " {59031a47-3f72-44a7-89c5-5595fe6b30ee}" - Type DWord - Value 0
2158+ # Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs
2159+ Function HideDesktopFromThisPC {
2160+ Write-Output " Hiding Desktop icon from This PC..."
2161+ Remove-Item - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" - Recurse - ErrorAction SilentlyContinue
21622162}
21632163
21642164# Show Desktop icon in This PC
0 commit comments