<#
.Synopsis
Modify Windows 11 Visual Effects?
.Description
Adjusting visual effects
Settings>System>About>Advanced system settings>Performance : Settings
Although by default the operating system uses the UserPreferencesMask parameter located in the HKEY_CURRENT_USER\Control Panel/Desktop node,
if the parameter with the same name is found in the HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop node,
then the last one will be used as the desktop.
This is very convenient for experimentation, to return to the default settings, simply remove the UserPreferencesMask parameter.
the UserPreferencesMask parameter from the HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop.
.Parameter
Adjusting
.Example
SetVisualEffects "Performance"
#>
Function SetVisualEffects {
[CmdletBinding()]
param(
[Parameter(Mandatory = $False)]
[string] $Adjusting = "Performance"
)
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 400
If ( $Adjusting -eq "Performance") {
Write-Host "Adjusting visual effects for performance..."
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1
#
# Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 0
#This disables the following 8 settings:
#Animate controls and elements inside windows
#Fade or slide menus into view
#Fade or slide ToolTips into view
#Fade out menu items after clicking
#Show shadows under mouse pointer
#Show shadows under windows
#Slide open combo boxes
#Smooth-scroll list boxes
$Value = ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00))
#$Value = ([byte[]](0x9E,0x12,0x03,0x80,0x10,0x00,0x00,0x00))
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value $Value
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 0
Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 0
# Disable window anim. min/max
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value "0"
}
else
# Adjusts visual effects for appearance
{
Write-Host "Adjusting visual effects for appearance..."
$Value = ([byte[]](0x9E,0x1E,0x07,0x80,0x12,0x00,0x00,0x00))
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value $Value
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 1
Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1
}
# ??? Disable Display Mode Change Animation
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Dwm" -Name "ForceDisableModeChangeAnimation" -Type DWord -Value 0x01
}