diff --git a/BaseProfile.nip b/BaseProfile.nip index 236cb468..3871f86b 100644 --- a/BaseProfile.nip +++ b/BaseProfile.nip @@ -4,6 +4,12 @@ Base Profile + + + 390467 + 2 + Dword + Texture filtering - Negative LOD bias 1686376 @@ -16,6 +22,18 @@ 0 Dword + + Watermarking Indicator + 3672192 + 0 + Dword + + + Watermarking Traceability + 3737728 + 0 + Dword + Vertical Sync Tear Control 5912412 @@ -58,6 +76,12 @@ 138504007 Dword + + Shader disk cache maximum size + 11306135 + 4294967295 + Dword + Texture filtering - Quality 13510289 @@ -67,7 +91,7 @@ Texture filtering - Anisotropic sample optimization 15151633 - 1 + 0 Dword @@ -142,6 +166,12 @@ 0 Dword + + FRL Low Latency + 277041152 + 1 + Dword + Frame Rate Limiter 277041154 @@ -181,7 +211,7 @@ Anisotropic filtering mode 282245910 - 1 + 0 Dword @@ -307,7 +337,7 @@ Preferred OpenGL GPU 550564838 - autoselect + id,2.0:250410DE,00000A00,GF - (368,6,161,12288) @ (0) String @@ -316,12 +346,6 @@ 0 Dword - - - 1343646814 - 0 - Dword - \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..bfd6c7a5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +MIT License +Copyright (c) 2022 DaddyMadu. + +Permission is hereby granted, free of charge, to any person obtaining a copy of my scripts/softwares and associated documentation files (the "Scripts/Softwares"), to deal in the Script/Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Script/Software. + +THE SCRIPT/SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SCRIPT/SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SCRIPT/SOFTWARE. diff --git a/README.md b/README.md index e7b504c9..55edb308 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ -# Windows10GamingFocus -This is A FORK Based On ChrisTitusTech that's foucus on debloat and optimize windows 10 for the lowest latency and best gaming experience, the Ultimate Windows 10 Script is a creation from multiple debloat scripts and gists from github. I also added Chocolatey and other tools to the script that I install on every machine. +# Windows10/11GamingFocus +This is A FORK Based On ChrisTitusTech that's foucus on debloat and optimize windows 10/11 for the lowest latency and best gaming experience, the Ultimate Windows 10/11 Script is a creation from multiple debloat scripts and gists from github. I also added Chocolatey and other tools to the script that I install on every machine. ``` Warrning: I am NOT responsible for what you do to your Devices/Systems, so follow these instructions at your own risk. Make sure you know what you're doing, it's best to understand the process rather than just copy and paste commands and such. ``` ## Changelog! +16 July 2022 +``` +- add better support for windows 11! +- Moved taskbar icons to the left. +- restored windows 10 context menu. +- disabling windows 11 start menu recomended section. +- bug fixes and imporvments. +``` 27 June 2021 ``` - Getting Ready for Windows 11 yay! @@ -19,7 +27,7 @@ Warrning: I am NOT responsible for what you do to your Devices/Systems, so follo ``` - Reverting removal of XBOX as it's required by some Amd system for recording! - Removing installation of Sumatra, ChocoGUI, disable Microsoft Software Protection Platform Service, disable Wsappx to Fix 100% Disk Usage, as they cause issue with alot of people. -- Fixing some issues with code and cleaning it to be prepaired with upcomming windows 10 21h1. +- Fixing some issues with code and cleaning it to be prepaired with upcomming windows 10/11 21h1. ``` 28 Feb 2021 ``` @@ -272,15 +280,15 @@ Option to Enable & Install Or Disable & Uninstall Microsoft OneDrive Simply Run cmd (Command Prompt) as Administrator and paste the following! ``` -powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('http://tweaks.daddymadu.gg')" +powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('http://tweaks.madu.gg')" ``` if error then use the following! ``` -powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &iex(New-Object Net.WebClient).DownloadString('http://tweaks.daddymadu.gg')" +powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &iex(New-Object Net.WebClient).DownloadString('http://tweaks.madu.gg')" ``` Or Run Powershell As Administrator and paste the following! ``` -iex(New-Object Net.WebClient).DownloadString('http://tweaks.daddymadu.gg') +iex(New-Object Net.WebClient).DownloadString('http://tweaks.madu.gg') ``` To enable Action Center, put the following into Powershell run As Administrator! ``` diff --git a/SetTimerResolutionService.exe b/SetTimerResolutionService.exe deleted file mode 100644 index d7a6d2aa..00000000 Binary files a/SetTimerResolutionService.exe and /dev/null differ diff --git a/nvidiaProfileInspector.exe b/nvidiaProfileInspector.exe index 01582852..eaf221a9 100644 Binary files a/nvidiaProfileInspector.exe and b/nvidiaProfileInspector.exe differ diff --git a/ooshutup10.cfg b/ooshutup10.cfg index 5500ab84..9c8cedf2 100644 --- a/ooshutup10.cfg +++ b/ooshutup10.cfg @@ -1,18 +1,20 @@ ############################################################################ -# This file was created with O&O ShutUp10 and can be imported onto another computer. +# This file was created with O&O ShutUp10++ V1.9.1431 +# and can be imported onto another computer. # # Download the application at https://www.oo-software.com/shutup10 # You can then import the file from within the program. # -# Alternatively you can import it automatically over a command line. Simply use -# the following parameter: -# ooshutup10.exe +# Alternatively you can import it automatically over a command line. +# Simply use the following parameter: +# OOSU10.exe # -# Selecting the Option /quiet ends the app right after the import and the user does not -# get any feedback about the import. +# Selecting the Option /quiet ends the app right after the import and the +# user does not get any feedback about the import. # # We are always happy to answer any questions you may have! -# © 2015-2020 O&O Software GmbH, Berlin. All rights reserved. https://www.oo-software.com/ +# © 2015-2022 O&O Software GmbH, Berlin. All rights reserved. +# https://www.oo-software.com/ ############################################################################ P001 + @@ -22,7 +24,6 @@ P004 + P005 + P006 + P008 + -P017 + P026 + P027 + P028 + @@ -30,21 +31,22 @@ P064 + P065 + P066 + P067 + +P070 + P069 + P009 - -P010 + +P010 - P015 + P068 - P016 - A001 + A002 + A003 + -A004 + -A006 + -A005 + +A004 - +A006 - +A005 - P007 + P036 + -P025 + +P025 - P033 + P023 + P056 + @@ -55,6 +57,7 @@ P013 - P035 - P062 - P063 - +P081 - P047 - P019 - P048 - @@ -96,8 +99,6 @@ S003 + S008 - E101 + E115 - -E116 + -E117 + E118 - E107 - E111 + @@ -105,6 +106,8 @@ E112 - E109 - E121 - E103 - +E123 - +E124 - E119 - E120 - E122 - @@ -138,6 +141,7 @@ C008 + C009 + C010 + C011 + +C014 - L001 + L003 + L004 - @@ -145,12 +149,15 @@ L005 + U001 + U004 + U005 + +U006 - +U007 - W001 - W011 + W004 - W005 - W010 - W009 - +P017 + W006 - W008 - M006 + @@ -164,6 +171,7 @@ S014 - K001 + K002 + K005 + +M022 + M001 + M004 + M005 + @@ -173,4 +181,9 @@ M013 - M014 - M015 + M016 + +M017 + +M018 + +M019 - +M020 + +M023 + N001 - diff --git a/win10debloatandgamingtweaks.ps1 b/win10debloatandgamingtweaks.ps1 index 748274f5..1a04d8bb 100644 --- a/win10debloatandgamingtweaks.ps1 +++ b/win10debloatandgamingtweaks.ps1 @@ -7,20 +7,40 @@ # # Addition: One command to rule them all, One command to find it, and One command to Run it! # -# > powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('http://tweaks.daddymadu.gg')" +# > powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('http://madu.gg/ps')" # # Changelogs Moved to ReadMe File for better mangement. # ########## -$host.ui.RawUI.WindowTitle = "DaddyMadu Ultimate Windows 10 Debloater and Gaming Focus Tweaker" -cmd /c 'title [DaddyMadu Ultimate Windows 10 Debloater and Gaming Focus Tweaker]' -Write-Host 'Welcome to DaddyMadu Ultimate Windows 10 Debloater and Gaming Focus Tweaker'; +$host.ui.RawUI.WindowTitle = "DaddyMadu Ultimate Windows Debloater and Gaming Focus Tweaker" +cmd /c 'title [DaddyMadu Ultimate Windows Debloater and Gaming Focus Tweaker]' +Write-Host 'Welcome to DaddyMadu Ultimate Windows Debloater and Gaming Focus Tweaker'; Write-Host "Please DISABLE your ANTIVIRUS to prevent any issues and PRESS any KEY to Continue!" -ForegroundColor Red -BackgroundColor Black $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown'); New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null -cls -# Default preset +$currentexename = (([Diagnostics.Process]::GetCurrentProcess().ProcessName) + '.exe') + if ($currentexename -eq "pwsh.exe") { + Start-Process Powershell -Argumentlist '-ExecutionPolicy bypass -NoProfile -command "irm "https://github.com/DaddyMadu/Windows10GamingFocus/raw/master/win10debloatandgamingtweaks.ps1" | iex"' -Verb RunAs + exit + } +Clear-Host +$wmic = Get-WindowsCapability -Online | Where-Object { $_.Name -like "*WMIC*" } + +if ($wmic.State -ne 'Installed') { + try { + Write-Host "WMIC is not installed, installing..." + Add-WindowsCapability -Online -Name $wmic.Name -ErrorAction Stop | Out-Null + Write-Host "WMIC installed successfully." + } catch { + Write-Host "Failed to install WMIC: $($_.Exception.Message)" + } +} else { + Write-Host "WMIC already installed." +} +Start-Sleep -s 5 +Clear-Host +# Desktop presets $tweaks = @( ### Require administrator privileges ### "RequireAdmin", @@ -28,31 +48,20 @@ $tweaks = @( ### Chris Titus Tech Additions "SlowUpdatesTweaks", - "Write-ColorOutput", #Utilizing Colors for better warrning messages! + "Write-ColorOutput", #Utilizing Colors for better Warning messages! "InstallTitusProgs", #REQUIRED FOR OTHER PROGRAM INSTALLS! "InstallMVC", #DaddyMadu install Microsoft Visualstudio required for HPET service! "Install7Zip", - #"InstallNotepadplusplus", - #"InstallIrfanview", - #"InstallVLC", - #"InstallSumatra", - #"InstallChrome", "InstallChocoUpdates", "EnableUlimatePower", # DaddyMadu don't change order it will break other functions! just disable if you want with # - # "ChangeDefaultApps", # Removed due to issues with steam and resetting default apps - ### DaddyMadu Windows Defender Settings! Don't Change Order Just Disable with # If You Don't want it ### - "MSIMode", #Enable Or Disable MSI Mode For Supported Cards, WARRNING ENABLING MSI MODE MIGHT CRUSH YOUR SYSTEM! IF IT HAPPENS PLEASE RESTORE LAST WORKING SYSTEM RESTORE POINT AND DON'T ENABLE MSI MODE ON THIS SYSTEM AGAIN! - "DisableNagle", + "MSIMode", #Enable Or Disable MSI Mode For Supported Cards, WARNING ENABLING MSI MODE MIGHT CRUSH YOUR SYSTEM! IF IT HAPPENS PLEASE RESTORE LAST WORKING SYSTEM RESTORE POINT AND DON'T ENABLE MSI MODE ON THIS SYSTEM AGAIN! "askDefender", "DorEOneDrive", #Option to Install Or Uninstall Microsoft One Drive! "askXBOX", - #"askMSPPS", #Option to enable or disable Microsoft Software Protection Platform Service” Causing High CPU Usage - #"askMSWSAPPX", #Option to enable or disable Wsappx to Fix 100% Disk Usage in Windows 10 in older systems - + "Windows11Extra", ### Windows Apps "DebloatAll", - ### Privacy Tweaks ### "DisableTelemetry", # "EnableTelemetry", "DisableWiFiSense", # "EnableWiFiSense", @@ -72,7 +81,6 @@ $tweaks = @( "DisableDiagTrack", # "EnableDiagTrack", "DisableWAPPush", # "EnableWAPPush", "DisableNewsFeed", - ### Security Tweaks ### "SetUACLow", # "SetUACHigh", # "EnableSharingMappedDrives", # "DisableSharingMappedDrives", @@ -89,13 +97,12 @@ $tweaks = @( #"DisableScriptHost", # "EnableScriptHost", #"EnableDotNetStrongCrypto", # "DisableDotNetStrongCrypto", "DisableMeltdownCompatFlag", # "EnableMeltdownCompatFlag" - ### Service Tweaks ### "EnableUpdateMSRT", # "EnableUpdateMSRT", #"DisableUpdateMSRT", "EnableUpdateDriver", # "EnableUpdateDriver", #"DisableUpdateDriver", "DisableUpdateRestart", # "EnableUpdateRestart", "DisableHomeGroups", # "EnableHomeGroups", - "DisableSharedExperiences", # "EnableSharedExperiences", + "EnableSharedExperiences", # "SharedExperiences", "DisableRemoteAssistance", # "EnableRemoteAssistance", "EnableRemoteDesktop", # "DisableRemoteDesktop", "DisableAutoplay", # "EnableAutoplay", @@ -110,8 +117,6 @@ $tweaks = @( "DisableSleepTimeout", # "EnableSleepTimeout", "DisableFastStartup", # "EnableFastStartup", "DISGaming", - - ### Windows Tweaks ### "PowerThrottlingOff", "Win32PrioritySeparation", @@ -126,11 +131,8 @@ $tweaks = @( "TurnOffSafeSearch", "DisableCloudSearch", "DisableDeviceHistory", - "DisableRemoteAssistance", "DisableSearchHistroy", "RemoveMeet", - - ### UI Tweaks ### "EnableActionCenter", # "DisableActionCenter", "EnableLockScreen", # "DisableLockScreen", @@ -155,8 +157,6 @@ $tweaks = @( # "AddENKeyboard", # "RemoveENKeyboard", "EnableNumlock", # "DisableNumlock", "EnableDarkMode", # "DisableDarkMode", - "Stop-EdgePDF", - ### Explorer UI Tweaks ### "ShowKnownExtensions", # "HideKnownExtensions", "HideHiddenFiles", @@ -165,25 +165,11 @@ $tweaks = @( "SetExplorerThisPC", # "SetExplorerQuickAccess", "ShowThisPCOnDesktop", # "HideThisPCFromDesktop", "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop", - # "HideDesktopFromThisPC", # "ShowDesktopInThisPC", - # "HideDesktopFromExplorer", # "ShowDesktopInExplorer", - # "HideDocumentsFromThisPC", # "ShowDocumentsInThisPC", - # "HideDocumentsFromExplorer", # "ShowDocumentsInExplorer", - # "HideDownloadsFromThisPC", # "ShowDownloadsInThisPC", - # "HideDownloadsFromExplorer", # "ShowDownloadsInExplorer", - #"ShowMusicInThisPC", #"HideMusicFromThisPC", - #"ShowMusicInExplorer", #"HideMusicFromExplorer", - # "HidePicturesFromThisPC", # "ShowPicturesInThisPC", - # "HidePicturesFromExplorer", # "ShowPicturesInExplorer", - #"ShowVideosInThisPC", #"HideVideosFromThisPC", - #"ShowVideosInExplorer", #"HideVideosFromExplorer", "Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC", "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer", "EnableThumbnails", # "EnableThumbnails", # "DisableThumbnails", "EnableThumbsDB", # "EnableThumbsDB", # "DisableThumbsDB", - ### Application Tweaks ### - "DisableAdobeFlash", # "EnableAdobeFlash", #"UninstallMediaPlayer", #"InstallMediaPlayer", "UninstallInternetExplorer", # "InstallInternetExplorer", "UninstallWorkFolders", # "InstallWorkFolders", @@ -192,16 +178,182 @@ $tweaks = @( "SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation", "AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith", "InstallPDFPrinter", # "UninstallPDFPrinter", - # "UninstallXPSPrinter", # "InstallXPSPrinter", - # "RemoveFaxPrinter", # "AddFaxPrinter", "SVCHostTweak", - ### Unpinning ### "UnpinStartMenuTiles", + ### DaddyMadu Quality Of Life Tweaks ### + "QOL", + ### DaddyMadu Gaming Tweaks ### + "FullscreenOptimizationFIX", + "GameOptimizationFIX", + "ApplyPCOptimizations", + "RawMouseInput", + "DetectnApplyMouseFIX", + "DisableHPET", + "EnableGameMode", + "EnableHAGS", + "DisableCoreParking", + "DisableDMA", + "DisablePKM", + "DisallowDIP", + "UseBigM", + "ForceContiguousM", + "DecreaseMKBuffer", + "StophighDPC", + "NvidiaTweaks", + "AMDGPUTweaks", + "NetworkAdapterRSS", + "NetworkOptimizations", + "DisableNagle", + "RemoveEdit3D", + "FixURLext", # fix issue with games shortcut that created by games lunchers turned white! + "UltimateCleaner", + "Finished" + ### Auxiliary Functions ### +) +#Mobile Devices presets. +$mobiletweaks = @( + ### Require administrator privileges ### + "RequireAdmin", + "CreateRestorePoint", + ### Chris Titus Tech Additions + "SlowUpdatesTweaks", + "Write-ColorOutput", #Utilizing Colors for better Warning messages! + "InstallTitusProgs", #REQUIRED FOR OTHER PROGRAM INSTALLS! + "InstallMVC", #DaddyMadu install Microsoft Visualstudio required for HPET service! + "Install7Zip", + "InstallChocoUpdates", + "EnableUlimatePower", # DaddyMadu don't change order it will break other functions! just disable if you want with # + ### DaddyMadu Windows Defender Settings! Don't Change Order Just Disable with # If You Don't want it ### + "MSIMode", #Enable Or Disable MSI Mode For Supported Cards, WARNING ENABLING MSI MODE MIGHT CRUSH YOUR SYSTEM! IF IT HAPPENS PLEASE RESTORE LAST WORKING SYSTEM RESTORE POINT AND DON'T ENABLE MSI MODE ON THIS SYSTEM AGAIN! + "askDefender", + "DorEOneDrive", #Option to Install Or Uninstall Microsoft One Drive! + "askXBOX", + "Windows11Extra", + ### Windows Apps + "DebloatAll", + ### Privacy Tweaks ### + "DisableTelemetry", # "EnableTelemetry", + "DisableWiFiSense", # "EnableWiFiSense", + "DisableSmartScreen", # "EnableSmartScreen", + "DisableWebSearch", # "EnableWebSearch", + "DisableAppSuggestions", # "EnableAppSuggestions", + "DisableActivityHistory", # "EnableActivityHistory", + "EnableBackgroundApps", #"DisableBackgroundApps", + "DisableLocationTracking", # "EnableLocationTracking", + "DisableMapUpdates", # "EnableMapUpdates", + "DisableFeedback", # "EnableFeedback", + "DisableTailoredExperiences", # "EnableTailoredExperiences", + "DisableAdvertisingID", # "EnableAdvertisingID", + "DisableCortana", # "EnableCortana", + "DisableErrorReporting", # "EnableErrorReporting", + "SetP2PUpdateLocal", # "SetP2PUpdateInternet", + "DisableDiagTrack", # "EnableDiagTrack", + "DisableWAPPush", # "EnableWAPPush", + "DisableNewsFeed", + ### Security Tweaks ### + "SetUACLow", # "SetUACHigh", + # "EnableSharingMappedDrives", # "DisableSharingMappedDrives", + # "DisableAdminShares", # "EnableAdminShares", + "DisableSMB1", # "EnableSMB1", + # "DisableSMBServer", # "EnableSMBServer", + # "DisableLLMNR", # "EnableLLMNR", + "SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic", + "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic", + "DisableNetDevicesAutoInst", # "EnableNetDevicesAutoInst", + "EnableF8BootMenu", # "DisableF8BootMenu", + #"SetDEPOptOut", # "SetDEPOptIn", + # "EnableCIMemoryIntegrity", # "DisableCIMemoryIntegrity", + #"DisableScriptHost", # "EnableScriptHost", + #"EnableDotNetStrongCrypto", # "DisableDotNetStrongCrypto", + "DisableMeltdownCompatFlag", # "EnableMeltdownCompatFlag" + ### Service Tweaks ### + "EnableUpdateMSRT", # "EnableUpdateMSRT", #"DisableUpdateMSRT", + "EnableUpdateDriver", # "EnableUpdateDriver", #"DisableUpdateDriver", + "DisableUpdateRestart", # "EnableUpdateRestart", + "DisableHomeGroups", # "EnableHomeGroups", + "EnableSharedExperiences", # "SharedExperiences", + "DisableRemoteAssistance", # "EnableRemoteAssistance", + "EnableRemoteDesktop", # "DisableRemoteDesktop", + "DisableAutoplay", # "EnableAutoplay", + "DisableAutorun", # "EnableAutorun", + "DisableStorageSense", # "EnableStorageSense", + "DisableDefragmentation", # "EnableDefragmentation", + "DisableSuperfetch", # "EnableSuperfetch", + "EnableIndexing", + "SetBIOSTimeUTC", #"SetBIOSTimeUTC", #"SetBIOSTimeLocal", + "DisableHibernation", # "EnableHibernation", + "EnableSleepButton", # "DisableSleepButton", + "DisableSleepTimeout", # "EnableSleepTimeout", + "DisableFastStartup", # "EnableFastStartup", + "DISGaming", + ### Windows Tweaks ### + "PowerThrottlingOff", + "Win32PrioritySeparation", + "DisableAERO", + "BSODdetails", + "Disablelivetiles", + "wallpaperquality", + "DisableShistory", + "Disableshortcutword", + "DisableMouseKKS", + "DisableTransparency", + "TurnOffSafeSearch", + "DisableCloudSearch", + "DisableDeviceHistory", + "DisableSearchHistroy", + "RemoveMeet", + ### UI Tweaks ### + "EnableActionCenter", # "DisableActionCenter", + "EnableLockScreen", # "DisableLockScreen", + "EnableLockScreenRS1", # "DisableLockScreenRS1", + # "HideNetworkFromLockScreen", # "ShowNetworkOnLockScreen", + # "HideShutdownFromLockScreen", # "ShowShutdownOnLockScreen", + "DisableStickyKeys", # "EnableStickyKeys", + "ShowTaskManagerDetails" # "HideTaskManagerDetails", + "ShowFileOperationsDetails", # "HideFileOperationsDetails", + "DisableFileDeleteConfirm", # "EnableFileDeleteConfirm", + "HideTaskbarSearch", + #"ShowTaskbarSearchIcon", # "ShowTaskbarSearchBox", + "HideTaskView", # "ShowTaskView", + # "ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons", + # "SetTaskbarCombineWhenFull", # "SetTaskbarCombineNever", # "SetTaskbarCombineAlways", + "HideTaskbarPeopleIcon", # "ShowTaskbarPeopleIcon", + #"HideTrayIcons", #"ShowTrayIcons", + "DisableSearchAppInStore", # "EnableSearchAppInStore", + "DisableNewAppPrompt", # "EnableNewAppPrompt", + # "SetControlPanelSmallIcons", # "SetControlPanelLargeIcons", # "SetControlPanelCategories", + "SetVisualFXPerformance", # "SetVisualFXAppearance", + # "AddENKeyboard", # "RemoveENKeyboard", + "EnableNumlock", # "DisableNumlock", + "EnableDarkMode", # "DisableDarkMode", + ### Explorer UI Tweaks ### + "ShowKnownExtensions", # "HideKnownExtensions", + "HideHiddenFiles", + "HideSyncNotifications" # "ShowSyncNotifications", + "HideRecentShortcuts", # "ShowRecentShortcuts", + "SetExplorerThisPC", # "SetExplorerQuickAccess", + "ShowThisPCOnDesktop", # "HideThisPCFromDesktop", + "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop", + "Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC", + "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer", + "EnableThumbnails", # "EnableThumbnails", # "DisableThumbnails", + "EnableThumbsDB", # "EnableThumbsDB", # "DisableThumbsDB", + ### Application Tweaks ### + #"UninstallMediaPlayer", #"InstallMediaPlayer", + "UninstallInternetExplorer", # "InstallInternetExplorer", + "UninstallWorkFolders", # "InstallWorkFolders", + "UninstallLinuxSubsystem", # "UninstallLinuxSubsystem", #"InstallLinuxSubsystem", + # "InstallHyperV", # "UninstallHyperV", + "SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation", + "AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith", + "InstallPDFPrinter", # "UninstallPDFPrinter", + "SVCHostTweak", + ### Unpinning ### + "UnpinStartMenuTiles", ### DaddyMadu Quality Of Life Tweaks ### "QOL", - ### DaddyMadu Gaming Tweaks ### "FullscreenOptimizationFIX", "GameOptimizationFIX", @@ -221,7 +373,9 @@ $tweaks = @( "StophighDPC", "NvidiaTweaks", "AMDGPUTweaks", + "NetworkAdapterRSS", "NetworkOptimizations", + "DisableNagle", "RemoveEdit3D", "FixURLext", # fix issue with games shortcut that created by games lunchers turned white! "UltimateCleaner", @@ -246,7 +400,7 @@ function Show-Choco-Menu { do { - cls + Clear-Host Write-Host "================ $Title ================" Write-Host "Y: Press 'Y' to do this." Write-Host "2: Press 'N' to skip this." @@ -265,23 +419,13 @@ function Show-Choco-Menu { Function SlowUpdatesTweaks { Write-Output "Improving Windows Update to delay Feature updates and only install Security Updates" ### Fix Windows Update to delay feature updates and only update at certain times - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "BranchReadinessLevel" -Type DWord -Value 16 -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 16 -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferFeatureUpdates" -Type DWord -Value 1 -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdates" -Type DWord -Value 1 -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferQualityUpdates" -Type DWord -Value 1 -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdates" -Type DWord -Value 1 -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 30d -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 30d -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferQualityUpdatesPeriodInDays" -Type DWord -Value 4d -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -Type DWord -Value 4d -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "PauseFeatureUpdatesStartTime" -Type String -Value "" -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "PauseFeatureUpdatesStartTime" -Type String -Value "" -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "PauseQualityUpdatesStartTime" -Type String -Value "" -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "PauseQualityUpdatesStartTime" -Type String -Value "" -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ActiveHoursEnd" -Type DWord -Value 2 -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "ActiveHoursEnd" -Type DWord -Value 2 -ErrorAction SilentlyContinue | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ActiveHoursStart" -Type DWord -Value 8 -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "ActiveHoursStart" -Type DWord -Value 8 -ErrorAction SilentlyContinue | Out-Null } @@ -313,7 +457,7 @@ function Write-ColorOutput } # Always write (if we want just a NewLine) - if($Object -eq $null) + if($null -eq $Object) { $Object = "" } @@ -334,7 +478,7 @@ function Write-ColorOutput Function InstallTitusProgs { Write-Output "Installing Chocolatey" - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install chocolatey-core.extension -y Write-Output "Running O&O Shutup with Recommended Settings" Import-Module BitsTransfer @@ -350,56 +494,32 @@ Function InstallTitusProgs { Function InstallMVC { choco install -y vcredist2010 | Out-Null } - -Function InstallSumatra { - Show-Choco-Menu -Title "Do you want to install lightweight Sumatra PDF Reader?" -ChocoInstall "sumatrapdf" -} - -Function InstallChrome { - Show-Choco-Menu -Title "Do you want to install Google Chrome Browser?" -ChocoInstall "googlechrome" -} Function Install7Zip { Choco Install 7zip -y } -Function InstallNotepadplusplus { - Show-Choco-Menu -Title "Do you want to install Notepad++?" -ChocoInstall "notepadplusplus" -} - -Function InstallVLC { - Show-Choco-Menu -Title "Do you want to install VLC?" -ChocoInstall "vlc" -} - -Function InstallIrfanview { - Show-Choco-Menu -Title "Do you want to install IrfanView PhotoViewer?" -ChocoInstall "irfanview" -} - Function InstallChocoUpdates { - cls + Clear-Host choco upgrade all -y } -Function ChangeDefaultApps { - Write-Output "Setting Default Programs - Notepad++ Brave VLC IrFanView" - Start-BitsTransfer -Source "https://raw.githubusercontent.com/DaddyMadu/Windows10GamingFocus/master/MyDefaultAppAssociations.xml" -Destination $HOME\Desktop\MyDefaultAppAssociations.xml - dism /online /Import-DefaultAppAssociations:"%UserProfile%\Desktop\MyDefaultAppAssociations.xml" -} - - #Apply PC Optimizations Function ApplyPCOptimizations { Write-Output "Applying PC Optimizations..." Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 4294967295 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 10 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "AlwaysOn" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "LazyMode" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "LazyModeTimeout" -Type DWord -Value 25000 } #Enable or Disable and remove xbox related apps Function askXBOX { do { - cls + Clear-Host Write-Host "================ Do You Want To Disable XBOX features and all related APPS? ================" - Write-ColorOutput "WARRNING: REMOVING XBOX APPS will make Win+G do nothing!" Red + Write-ColorOutput "WARNING: REMOVING XBOX APPS will make Win+G do nothing!" Red Write-Host "Y: Press 'Y' to Disable XBOX features." Write-Host "N: Press 'N' to Enable XBOX features." Write-Host "Q: Press 'Q' to Skip this." @@ -421,21 +541,21 @@ Function askXBOX { } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0 $ErrorActionPreference = $errpref #restore previous preference - cls + Clear-Host } 'n' { $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" Write-Output "Enabling Xbox features..." - Get-AppxPackage -AllUsers "Microsoft.XboxApp" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Get-AppxPackage -AllUsers "Microsoft.XboxIdentityProvider" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Get-AppxPackage -AllUsers "Microsoft.XboxSpeechToTextOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Get-AppxPackage -AllUsers "Microsoft.Xbox.TCUI" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + Get-AppxPackage -AllUsers "Microsoft.XboxApp" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + Get-AppxPackage -AllUsers "Microsoft.XboxIdentityProvider" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + Get-AppxPackage -AllUsers "Microsoft.XboxSpeechToTextOverlay" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + Get-AppxPackage -AllUsers "Microsoft.Xbox.TCUI" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1 Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue $ErrorActionPreference = $errpref #restore previous preference - cls + Clear-Host } 'q' { } } @@ -444,7 +564,7 @@ Function askXBOX { } -#Enable Or Disable MSI Mode For Supported Cards, WARRNING ENABLING MSI MODE MIGHT CRUSH YOUR SYSTEM! IF IT HAPPENS PLEASE RESTORE LAST WORKING SYSTEM RESTORE POINT AND DON'T ENABLE MSI MODE ON THIS SYSTEM AGAIN! +#Enable Or Disable MSI Mode For Supported Cards, WARNING ENABLING MSI MODE MIGHT CRUSH YOUR SYSTEM! IF IT HAPPENS PLEASE RESTORE LAST WORKING SYSTEM RESTORE POINT AND DON'T ENABLE MSI MODE ON THIS SYSTEM AGAIN! Function MSIMode { $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" @@ -621,7 +741,7 @@ Function EnableActivityHistory { # Disable Background application access - ie. if apps can download or update when they aren't used - Cortana is excluded as its inclusion breaks start menu search Function DisableBackgroundApps { Write-Output "Disabling Background application access..." - Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach { + Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach-Object { Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1 Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1 } @@ -630,7 +750,7 @@ Function DisableBackgroundApps { # Enable Background application access Function EnableBackgroundApps { Write-Output "Enabling Background application access..." - Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach { + Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object { Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue } @@ -959,7 +1079,7 @@ Function askDefender { do { - cls + Clear-Host Write-Host "================ Do you want to Disable Microsoft Windows Defender? ================" Write-Host "Y: Press 'Y' to Disable Microsoft Windows Defender." Write-Host "N: Press 'N' to Enable Microsoft Windows Defender." @@ -993,7 +1113,7 @@ Function askDefender { Disable-ScheduledTask -TaskName "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" | Out-Null Disable-ScheduledTask -TaskName "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" | Out-Null Disable-ScheduledTask -TaskName "\Microsoft\Windows\Windows Defender\Windows Defender Verification" | Out-Null - cls + Clear-Host } 'n' { Write-Output "Enabling Microsoft Windows Defender and related Processes..." @@ -1012,7 +1132,7 @@ Function askDefender { Enable-ScheduledTask -TaskName "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" | Out-Null Enable-ScheduledTask -TaskName "\Microsoft\Windows\Windows Defender\Windows Defender Verification" | Out-Null Set-MpPreference -EnableControlledFolderAccess Disabled -ErrorAction SilentlyContinue - cls + Clear-Host } 'q' { } } @@ -1021,84 +1141,6 @@ Function askDefender { } -#Ask User If He Want to Enable Or Disable Microsoft Software Protection Platform Service -Function askMSPPS { - - do - { - cls - Write-Host "================ Do you have High CPU Usage from Microsoft Software Protection Platform Service? ================" - Write-ColorOutput "Warrning: Windows Default is ENABLED, if you Disabled it, Windows 10/Office will show not activated state but you can use it as normal" Red - Write-Host "Y: Press 'Y' to Disable this." - Write-Host "N: Press 'N' to Enable this." - Write-Host "Q: Press 'Q' to stop the entire script." - $selection = Read-Host "Please make a selection" - switch ($selection) - { - 'y' { - Write-Output "Disabling Microsoft Software Protection Platform Service and related Processes..." - Disable-ScheduledTask -TaskName "\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" | Out-Null - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\sppsvc" -Name "Start" -Type DWord -Value 4 -ErrorAction SilentlyContinue - cls - } - 'n' { - Write-Output "Enabling Microsoft Software Protection Platform Service and related Processes..." - Enable-ScheduledTask -TaskName "\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" | Out-Null - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\sppsvc" -Name "Start" -Type DWord -Value 2 -ErrorAction SilentlyContinue - cls - } - 'q' { Exit } - } - } - until ($selection -match "y" -or $selection -match "n" -or $selection -match "q") - -} - -#Ask User If He Want to Enable Or Disable Microsoft Store and WSAPPX Service -Function askMSWSAPPX { - - do - { - cls - Write-Host "================ Do you want to disable Microsoft Store and Disable WSAPPX Service? ================" - Write-ColorOutput "Warrning: Windows Default is ENABLED, if you Disabled it and wanted to enable it again and restore Microsoft Store Please run the script twise and choose N" Red - Write-Host "Y: Press 'Y' to Disable this." - Write-Host "N: Press 'N' to Enable this." - Write-Host "Q: Press 'Q' to stop the entire script." - $selection = Read-Host "Please make a selection" - switch ($selection) - { - 'y' { - Write-Output "Disabling Microsoft Store and WSAPPX Service..." - $errpref = $ErrorActionPreference #save actual preference - $ErrorActionPreference = "silentlycontinue" - Get-AppxPackage "Microsoft.DesktopAppInstaller" | Remove-AppxPackage -ErrorAction SilentlyContinue - Get-AppxPackage "Microsoft.WindowsStore" | Remove-AppxPackage -ErrorAction SilentlyContinue - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Force | Out-Null - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Name "DisableStoreApps" -Type DWord -Value 1 -ErrorAction SilentlyContinue - Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Services\AppXSvc" -Name "Start" -Type DWord -Value 4 -ErrorAction SilentlyContinue - $ErrorActionPreference = $errpref #restore previous preference - cls - } - 'n' { - Write-Output "Enabling Microsoft Store and WSAPPX Service..." - $errpref = $ErrorActionPreference #save actual preference - $ErrorActionPreference = "silentlycontinue" - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Name "DisableStoreApps" -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Force | Out-Null - Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Services\AppXSvc" -Name "Start" -Type DWord -Value 3 -ErrorAction SilentlyContinue - Get-AppxPackage -AllUsers "Microsoft.DesktopAppInstaller" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} -ErrorAction SilentlyContinue - Get-AppxPackage -AllUsers "Microsoft.WindowsStore" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} -ErrorAction SilentlyContinue - $ErrorActionPreference = $errpref #restore previous preference - cls - } - 'q' { Exit } - } - } - until ($selection -match "y" -or $selection -match "n" -or $selection -match "q") - -} - # Enable F8 boot menu options Function EnableF8BootMenu { Write-Output "Enabling F8 boot menu options..." @@ -1309,12 +1351,6 @@ Function EnableSharedExperiences { Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableMmx" -ErrorAction SilentlyContinue } -# Disable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed) -Function DisableRemoteAssistance { - Write-Output "Disabling Remote Assistance..." - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0 -} - # Enable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed) Function EnableRemoteAssistance { Write-Output "Enabling Remote Assistance..." @@ -1547,7 +1583,7 @@ Function PowerThrottlingOff { #Setting Processor scheduling. Function Win32PrioritySeparation { Write-Output "Setting Processor scheduling..." - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl" -Name "Win32PrioritySeparation" -Type DWord -Value 0x00000026 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl" -Name "Win32PrioritySeparation" -Type DWord -Value 0x00000028 } #Disabling aero shake. @@ -1740,6 +1776,8 @@ Function EnableStickyKeys { # Show Task Manager details - Applicable to 1607 and later - Although this functionality exist even in earlier versions, the Task Manager's behavior is different there and is not compatible with this tweak Function ShowTaskManagerDetails { +If ([System.Environment]::OSVersion.Version.Build -ge 22000) { +} Else { Write-Output "Showing task manager details..." $taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru Do { @@ -1749,6 +1787,7 @@ Function ShowTaskManagerDetails { Stop-Process $taskmgr $preferences.Preferences[28] = 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -Type Binary -Value $preferences.Preferences + } } # Hide Task Manager details @@ -1940,7 +1979,7 @@ Function SetVisualFXPerformance { Write-Output "Adjusting visual effects for performance..." Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 0 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 200 - Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0)) + Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Value ([byte[]](144, 18, 3, 128, 18, 0, 0, 0)) 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 @@ -1956,7 +1995,7 @@ Function SetVisualFXAppearance { Write-Output "Adjusting visual effects for appearance..." 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 200 - Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](158,30,7,128,18,0,0,0)) + Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Value ([byte[]](144, 18, 3, 128, 18, 0, 0, 0)) 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 @@ -1978,7 +2017,7 @@ Function AddENKeyboard { Function RemoveENKeyboard { Write-Output "Removing secondary en-US keyboard..." $langs = Get-WinUserLanguageList - Set-WinUserLanguageList ($langs | ? {$_.LanguageTag -ne "en-US"}) -Force + Set-WinUserLanguageList ($langs | Where-Object {$_.LanguageTag -ne "en-US"}) -Force } # Enable NumLock after startup @@ -2117,203 +2156,6 @@ Function HideUserFolderFromDesktop { Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -ErrorAction SilentlyContinue } -# Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs -Function HideDesktopFromThisPC { - Write-Output "Hiding Desktop icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Desktop icon in This PC -Function ShowDesktopInThisPC { - Write-Output "Showing Desktop icon in This PC..." - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" | Out-Null - } -} - -# Hide Desktop icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HideDesktopFromExplorer { - Write-Output "Hiding Desktop icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Desktop icon in Explorer namespace -Function ShowDesktopInExplorer { - Write-Output "Showing Desktop icon in Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" -} - -# Hide Documents icon from This PC - The icon remains in personal folders and open/save dialogs -Function HideDocumentsFromThisPC { - Write-Output "Hiding Documents icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" -Recurse -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Documents icon in This PC -Function ShowDocumentsInThisPC { - Write-Output "Showing Documents icon in This PC..." - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" | Out-Null - } - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" | Out-Null - } -} - -# Hide Documents icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HideDocumentsFromExplorer { - Write-Output "Hiding Documents icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Documents icon in Explorer namespace -Function ShowDocumentsInExplorer { - Write-Output "Showing Documents icon in Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" -} - -# Hide Downloads icon from This PC - The icon remains in personal folders and open/save dialogs -Function HideDownloadsFromThisPC { - Write-Output "Hiding Downloads icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" -Recurse -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Downloads icon in This PC -Function ShowDownloadsInThisPC { - Write-Output "Showing Downloads icon in This PC..." - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" | Out-Null - } - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" | Out-Null - } -} - -# Hide Downloads icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HideDownloadsFromExplorer { - Write-Output "Hiding Downloads icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Downloads icon in Explorer namespace -Function ShowDownloadsInExplorer { - Write-Output "Showing Downloads icon in Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" -} - -# Hide Music icon from This PC - The icon remains in personal folders and open/save dialogs -Function HideMusicFromThisPC { - Write-Output "Hiding Music icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" -Recurse -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Music icon in This PC -Function ShowMusicInThisPC { - Write-Output "Showing Music icon in This PC..." - $errpref = $ErrorActionPreference #save actual preference - $ErrorActionPreference = "silentlycontinue" - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" | Out-Null - } - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" | Out-Null - } - $ErrorActionPreference = $errpref #restore previous preference -} - -# Hide Music icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HideMusicFromExplorer { - Write-Output "Hiding Music icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Music icon in Explorer namespace -Function ShowMusicInExplorer { - Write-Output "Showing Music icon in Explorer namespace..." - $errpref = $ErrorActionPreference #save actual preference - $ErrorActionPreference = "silentlycontinue" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - $ErrorActionPreference = $errpref #restore previous preference -} - -# Hide Pictures icon from This PC - The icon remains in personal folders and open/save dialogs -Function HidePicturesFromThisPC { - Write-Output "Hiding Pictures icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" -Recurse -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Pictures icon in This PC -Function ShowPicturesInThisPC { - Write-Output "Showing Pictures icon in This PC..." - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" | Out-Null - } - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" | Out-Null - } -} - -# Hide Pictures icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HidePicturesFromExplorer { - Write-Output "Hiding Pictures icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Pictures icon in Explorer namespace -Function ShowPicturesInExplorer { - Write-Output "Showing Pictures icon in Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" -} - -# Hide Videos icon from This PC - The icon remains in personal folders and open/save dialogs -Function HideVideosFromThisPC { - Write-Output "Hiding Videos icon from This PC..." - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" -Recurse -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" -Recurse -ErrorAction SilentlyContinue -} - -# Show Videos icon in This PC -Function ShowVideosInThisPC { - Write-Output "Showing Videos icon in This PC..." - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" | Out-Null - } - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" | Out-Null - } -} - -# Hide Videos icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs -Function HideVideosFromExplorer { - Write-Output "Hiding Videos icon from Explorer namespace..." - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide" -} - -# Show Videos icon in Explorer namespace -Function ShowVideosInExplorer { - Write-Output "Showing Videos icon in Explorer namespace..." - $errpref = $ErrorActionPreference #save actual preference - $ErrorActionPreference = "silentlycontinue" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show" - $ErrorActionPreference = $errpref #restore previous preference -} - # Hide 3D Objects icon from This PC - The icon remains in personal folders and open/save dialogs Function Hide3DObjectsFromThisPC { Write-Output "Hiding 3D Objects icon from This PC..." @@ -2390,7 +2232,7 @@ Function DorEOneDrive { do { - cls + Clear-Host Write-Host "================ Do you want to Disable Microsoft OneDrive? ================" Write-Host "Y: Press 'Y' to Disable OneDrive." Write-Host "N: Press 'N' to Enable OneDrive." @@ -2433,7 +2275,7 @@ Function DorEOneDrive { Remove-Item -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" Get-ScheduledTask -TaskPath '\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false $ErrorActionPreference = $errpref #restore previous preference - cls + Clear-Host } 'n' { Write-Output "Enabling Microsoft OneDrive and related Processes..." @@ -2449,7 +2291,7 @@ Function DorEOneDrive { } Start-Process $onedrive -NoNewWindow $ErrorActionPreference = $errpref #restore previous preference - cls + Clear-Host } 'q' { } } @@ -2458,26 +2300,6 @@ Function DorEOneDrive { } -# Disable built-in Adobe Flash in IE and Edge -Function DisableAdobeFlash { - Write-Output "Disabling built-in Adobe Flash in IE and Edge..." - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer" -Name "DisableFlashInIE" -Type DWord -Value 1 - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons" -Name "FlashPlayerEnabled" -Type DWord -Value 0 -} - -# Enable built-in Adobe Flash in IE and Edge -Function EnableAdobeFlash { - Write-Output "Enabling built-in Adobe Flash in IE and Edge..." - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer" -Name "DisableFlashInIE" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons" -Name "FlashPlayerEnabled" -ErrorAction SilentlyContinue -} - # Uninstall Windows Media Player Function UninstallMediaPlayer { Write-Output "Uninstalling Windows Media Player..." @@ -2493,7 +2315,10 @@ Function InstallMediaPlayer { # Uninstall Internet Explorer Function UninstallInternetExplorer { Write-Output "Uninstalling Internet Explorer..." + If ([System.Environment]::OSVersion.Version.Build -ge 22000) { + } Else { Disable-WindowsOptionalFeature -Online -FeatureName "Internet-Explorer-Optional-$env:PROCESSOR_ARCHITECTURE" -NoRestart -WarningAction SilentlyContinue | Out-Null + } } # Install Internet Explorer @@ -2621,30 +2446,6 @@ Function InstallPDFPrinter { Enable-WindowsOptionalFeature -Online -FeatureName "Printing-PrintToPDFServices-Features" -NoRestart -WarningAction SilentlyContinue | Out-Null } -# Uninstall Microsoft XPS Document Writer -Function UninstallXPSPrinter { - Write-Output "Uninstalling Microsoft XPS Document Writer..." - Disable-WindowsOptionalFeature -Online -FeatureName "Printing-XPSServices-Features" -NoRestart -WarningAction SilentlyContinue | Out-Null -} - -# Install Microsoft XPS Document Writer -Function InstallXPSPrinter { - Write-Output "Installing Microsoft XPS Document Writer..." - Enable-WindowsOptionalFeature -Online -FeatureName "Printing-XPSServices-Features" -NoRestart -WarningAction SilentlyContinue | Out-Null -} - -# Remove Default Fax Printer -Function RemoveFaxPrinter { - Write-Output "Removing Default Fax Printer..." - Remove-Printer -Name "Fax" -ErrorAction SilentlyContinue -} - -# Add Default Fax Printer -Function AddFaxPrinter { - Write-Output "Adding Default Fax Printer..." - Add-Printer -Name "Fax" -DriverName "Microsoft Shared Fax Driver" -PortName "SHRFAX:" -ErrorAction SilentlyContinue -} - # Add SVCHost Tweak Function SVCHostTweak { Write-Output "Adding SVCHost Tweak..." @@ -2660,6 +2461,17 @@ Function UnpinStartMenuTiles { Write-Output "Unpinning all Start Menu tiles..." $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" + If ([System.Environment]::OSVersion.Version.Build -ge 22000) { + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoRecentDocsHistory" -Type DWord -Value 0 | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Start_TrackDocs" -Type DWord -Value 0 | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoStartMenuMorePrograms" | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoStartMenuMorePrograms" | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "LockedStartLayout" | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "StartLayoutFile" | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "LockedStartLayout" | Out-Null -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "StartLayoutFile" | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Start_Layout" -Type DWord -Value 1 | Out-Null -ErrorAction SilentlyContinue + } Else { Invoke-WebRequest -Uri "https://git.io/JL54C" -OutFile "$env:UserProfile\StartLayout.xml" -ErrorAction SilentlyContinue Import-StartLayout -layoutpath "$env:UserProfile\StartLayout.xml" -MountPath "$env:SystemDrive\" Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "LockedStartLayout" -Type DWord -Value 1 | Out-Null -ErrorAction SilentlyContinue @@ -2682,14 +2494,15 @@ Function UnpinStartMenuTiles { Name = $Value Value = $Key.GetValue($Value) Type = $Key.GetValueKind($Value) + } } } } } $YourInputStart = "02,00,00,00,e6,d9,21,ac,f8,e0,d6,01,00,00,00,00,43,42,01,00,c2,14,01,cb,32,0a,03,05,ce,ab,d3,e9,02,24,da,f4,03,44,c3,8a,01,66,82,e5,8b,b1,ae,fd,fd,bb,3c,00,05,a0,8f,fc,c1,03,24,8a,d0,03,44,80,99,01,66,b0,b5,99,dc,cd,b0,97,de,4d,00,05,86,91,cc,93,05,24,aa,a3,01,44,c3,84,01,66,9f,f7,9d,b1,87,cb,d1,ac,d4,01,00,c2,3c,01,c5,5a,01,00" -$hexifiedStart = $YourInputStart.Split(',') | % { "0x$_"} -ls -r "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\" | get-itemproperty2 | where { $_ -like '*windows.data.unifiedtile.startglobalproperties*' } | set-itemproperty -value (([byte[]]$hexifiedStart)) +$hexifiedStart = $YourInputStart.Split(',') | ForEach-Object { "0x$_"} +Get-ChildItem -r "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\" | get-itemproperty2 | Where-Object { $_ -like '*windows.data.unifiedtile.startglobalproperties*' } | set-itemproperty -value (([byte[]]$hexifiedStart)) Stop-Process -name explorer | Out-Null $ErrorActionPreference = $errpref #restore previous preference } @@ -2697,6 +2510,22 @@ Stop-Process -name explorer | Out-Null ########## # DaddyMadu Quality Of Life Tweaks ########## +# Windows 11 Extra Tweaks +function Windows11Extra { + If ([System.Environment]::OSVersion.Version.Build -ge 22000) { + Write-Output "Restoring windows 10 context menu and disabling start menu recommended section..." + New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -ErrorAction SilentlyContinue | Out-Null #context menu setup + reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAl" -Type DWord -Value 0 #set taskbar icons to the left + Get-appxpackage -all *shellexperience* -packagetype bundle |ForEach-Object {add-appxpackage -register -disabledevelopmentmode ($_.installlocation + '\appxmetadata\appxbundlemanifest.xml')} + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarDa" -Type DWord -Value 0 #disable widget icon from taskbar + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarMn" -Type DWord -Value 0 #disable chat icon from taskbar + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "HideRecentlyAddedApps" -Type DWord -Value 1 #Disable start menu RecentlyAddedApps + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" -Name "ThreadDpcEnable" -Type DWord -Value 0 | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" -Name "GlobalTimerResolutionRequests" -Type DWord -Value 1 | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" -Name "UnlimitDpcQueue" -Type DWord -Value 1 | Out-Null -ErrorAction SilentlyContinue + } +} # Enable Quality Of Life Tweaks Function QOL { Write-Output "Enabling DaddyMadu Quality of Life Tweaks..." @@ -2706,7 +2535,11 @@ Function QOL { Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" -Name "ScoobeSystemSettingEnabled" -Type DWord -Value 0 | Out-Null -ErrorAction SilentlyContinue #disable annoying Get even more out of Windows Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility" -Name "DynamicScrollbars" -Type DWord -Value 0 #disable Hide Scroll bars Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "SmoothScroll" -Type DWord -Value 0 #disable smooth scrolling + If ([System.Environment]::OSVersion.Version.Build -ge 22000) { Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoInstrumentation" -Type DWord -Value 1 #disable microsoft usertracking + } Else { + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoInstrumentation" -Type DWord -Value 1 #disable microsoft usertracking + } Remove-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "TaskbarNoMultimon" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "TaskbarNoMultimon" -ErrorAction SilentlyContinue Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "MMTaskbarMode" -Type DWord -Value 2 #Show taskbar buttons only on taskbar where window is open @@ -2719,6 +2552,8 @@ Function QOL { #Disable Fullscreen Optimizations Function FullscreenOptimizationFIX { + $errpref = $ErrorActionPreference #save actual preference + $ErrorActionPreference = "silentlycontinue" Write-Output "Disabling Full ScreenOptimization..." Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_FSEBehaviorMode" -Type DWord -Value 2 Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type DWord -Value 1 @@ -2727,6 +2562,12 @@ Function FullscreenOptimizationFIX { Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DSEBehavior" -Type DWord -Value 2 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AppCaptureEnabled" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\Software\Microsoft\DirectX\GraphicsSettings" -Name "SwapEffectUpgradeCache" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\Software\Microsoft\DirectX\UserGpuPreferences" -Name "DirectXUserGlobalSettings" -Type String -Value 'SwapEffectUpgradeEnable=1;' + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name "InactivityShutdownDelay" -Type DWord -Value 4294967295 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Dwm" -Name "OverlayTestMode" -Type DWord -Value 5 + Disable-MMAgent -MemoryCompression | Out-Null + $ErrorActionPreference = $errpref #restore previous preference } #Game Optimizations Priority Tweaks -Type String -Value "Deny" @@ -2737,6 +2578,17 @@ Function GameOptimizationFIX { Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "Scheduling Category" -Type String -Value "High" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "SFIO Priority" -Type String -Value "High" Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl" -Name "IRQ8Priority" -Type DWord -Value 1 + reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 4 /f | Out-Null + reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions" /v IoPriority /t REG_DWORD /d 3 /f | Out-Null + fsutil behavior set disable8dot3 1 + fsutil behavior set disablelastaccess 1 + $PlatformCheck = (Get-Computerinfo).CsPCSystemType + if ($PlatformCheck -eq "Desktop") { + Write-Output "Platform is $PlatformCheck Disabling power saving options on all connected devices..." + Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi | ForEach-Object { $_.enable = $false; $_.psbase.put(); } | Out-Null + } else { + Write-Output "Platform is $PlatformCheck No power saving edits has been made." + } } #Forcing Raw Mouse Input @@ -2783,8 +2635,8 @@ Write-Output "Windows screen scale is Detected as 100%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,C0,CC,0C,00,00,00,00,00,80,99,19,00,00,00,00,00,40,66,26,00,00,00,00,00,00,33,33,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "125") { @@ -2792,8 +2644,8 @@ Write-Output "Windows screen scale is Detected as 125%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,20,00,00,00,00,00,00,00,30,00,00,00,00,00,00,00,40,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "150") { @@ -2801,8 +2653,8 @@ Write-Output "Windows screen scale is Detected as 150%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,30,33,13,00,00,00,00,00,60,66,26,00,00,00,00,00,90,99,39,00,00,00,00,00,C0,CC,4C,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "175") { @@ -2810,8 +2662,8 @@ Write-Output "Windows screen scale is Detected as 175%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,60,66,16,00,00,00,00,00,C0,CC,2C,00,00,00,00,00,20,33,43,00,00,00,00,00,80,99,59,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "200") { @@ -2819,8 +2671,8 @@ Write-Output "Windows screen scale is Detected as 200%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,90,99,19,00,00,00,00,00,20,33,33,00,00,00,00,00,B0,CC,4C,00,00,00,00,00,40,66,66,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "225") { @@ -2828,8 +2680,8 @@ Write-Output "Windows screen scale is Detected as 225%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,C0,CC,1C,00,00,00,00,00,80,99,39,00,00,00,00,00,40,66,56,00,00,00,00,00,00,33,73,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "250") { @@ -2837,8 +2689,8 @@ Write-Output "Windows screen scale is Detected as 250%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,00,00,20,00,00,00,00,00,00,00,40,00,00,00,00,00,00,00,60,00,00,00,00,00,00,00,80,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "300") { @@ -2846,8 +2698,8 @@ Write-Output "Windows screen scale is Detected as 300%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,60,66,26,00,00,00,00,00,C0,CC,4C,00,00,00,00,00,20,33,73,00,00,00,00,00,80,99,99,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } elseif($checkscreenscale -eq "350") { @@ -2855,8 +2707,8 @@ Write-Output "Windows screen scale is Detected as 350%, Applying Mouse Fix for i $YourInputX = "00,00,00,00,00,00,00,00,C0,CC,2C,00,00,00,00,00,80,99,59,00,00,00,00,00,40,66,86,00,00,00,00,00,00,33,B3,00,00,00,00,00" $YourInputY = "00,00,00,00,00,00,00,00,00,00,38,00,00,00,00,00,00,00,70,00,00,00,00,00,00,00,A8,00,00,00,00,00,00,00,E0,00,00,00,00,00" $RegPath = 'HKCU:\Control Panel\Mouse' -$hexifiedX = $YourInputX.Split(',') | % { "0x$_"} -$hexifiedY = $YourInputY.Split(',') | % { "0x$_"} +$hexifiedX = $YourInputX.Split(',') | ForEach-Object { "0x$_"} +$hexifiedY = $YourInputY.Split(',') | ForEach-Object { "0x$_"} Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseXCurve" -Type Binary -Value (([byte[]]$hexifiedX)) Set-ItemProperty -Path "$RegPath" -Name "SmoothMouseYCurve" -Type Binary -Value (([byte[]]$hexifiedY)) } else { @@ -2869,17 +2721,15 @@ Function DisableHPET { Write-Output "Disabling High Precision Event Timer..." $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" - Invoke-WebRequest -Uri "https://git.io/JkrLn" -OutFile "$Env:windir\system32\SetTimerResolutionService.exe" -ErrorAction SilentlyContinue - New-Service -name "SetTimerResolutionService" -BinaryPathName "$Env:windir\system32\SetTimerResolutionService.exe" -StartupType Automatic | Out-Null -ErrorAction SilentlyContinue bcdedit /set x2apicpolicy Enable | Out-Null bcdedit /set configaccesspolicy Default | Out-Null bcdedit /set MSI Default | Out-Null bcdedit /set usephysicaldestination No | Out-Null bcdedit /set usefirmwarepcisettings No | Out-Null bcdedit /deletevalue useplatformclock | Out-Null - bcdedit /set disabledynamictick yes | Out-Null - bcdedit /set useplatformtick Yes | Out-Null - bcdedit /set tscsyncpolicy Enhanced | Out-Null + bcdedit /deletevalue useplatformtick | Out-Null + bcdedit /deletevalue disabledynamictick | Out-Null + bcdedit /deletevalue tscsyncpolicy | Out-Null bcdedit /timeout 10 | Out-Null bcdedit /set nx optout | Out-Null bcdedit /set bootux disabled | Out-Null @@ -2887,7 +2737,14 @@ Function DisableHPET { bcdedit /set {globalsettings} custom:16000067 true | Out-Null bcdedit /set {globalsettings} custom:16000069 true | Out-Null bcdedit /set {globalsettings} custom:16000068 true | Out-Null - wmic path Win32_PnPEntity where "name='High precision event timer'" call disable | Out-Null + wmic path Win32_PnPEntity where "name='High precision event timer'" call enable | Out-Null + if ($PlatformCheck -eq "Desktop") { + Write-Output "Platform is $PlatformCheck disabling dynamic tick..." + bcdedit /set disabledynamictick yes | Out-Null + } else { + Write-Output "Platform is $PlatformCheck enabling dynamic tick..." + bcdedit /set disabledynamictick no + } $ErrorActionPreference = $errpref #restore previous preference } @@ -2909,10 +2766,26 @@ Function EnableHAGS { #Add Utimate Power Plan And Activate It Function EnableUlimatePower { + Write-Output "Enabling and Activating Bitsum Highest Performance Power Plan..." + $powerSchemes = powercfg /l | ForEach-Object { + if ($_ -match '^Power Scheme GUID:\s*([-0-9a-f]+)\s*\(([^)]+)\)\s*(\*)?') { + [PsCustomObject]@{ + GUID = $matches[1] + SchemeName = $matches[2] + Active = $matches[3] -eq '*' + } + } +} + $customScheme = ($powerSchemes | Where-Object { $_.SchemeName -eq 'Bitsum Highest Performance' }).GUID + if ($customScheme -eq 'e6a66b66-d6df-666d-aa66-66f66666eb66') { + Write-Output "Power Plan already exist! setting it as active..." + powercfg -setactive e6a66b66-d6df-666d-aa66-66f66666eb66 | Out-Null + } else { Write-Output "Enabling and Activating Bitsum Highest Performance Power Plan..." Invoke-WebRequest -Uri "https://git.io/JsWhn" -OutFile "$Env:windir\system32\Bitsum-Highest-Performance.pow" -ErrorAction SilentlyContinue powercfg -import "$Env:windir\system32\Bitsum-Highest-Performance.pow" e6a66b66-d6df-666d-aa66-66f66666eb66 | Out-Null powercfg -setactive e6a66b66-d6df-666d-aa66-66f66666eb66 | Out-Null + } } #Disable Core Parking on current PowerPlan Ultimate Performance @@ -2920,6 +2793,10 @@ Function DisableCoreParking { Write-Output "Disabling Core Parking on current PowerPlan Ultimate Performance..." powercfg -attributes SUB_PROCESSOR CPMINCORES -ATTRIB_HIDE | Out-Null Powercfg -setacvalueindex scheme_current sub_processor CPMINCORES 100 | Out-Null + powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 0 | Out-Null + powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0 | Out-Null + powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0 | Out-Null + powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 5000 | Out-Null Powercfg -setactive scheme_current | Out-Null } @@ -2928,13 +2805,23 @@ Function DisableDMA { Write-Output "Disabling DMA memory protection and cores isolation..." $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" - bcdedit /set vsmlaunchtype Off | Out-Null - bcdedit /set vm No | Out-Null + #bcdedit /set vsmlaunchtype Off | Out-Null + #bcdedit /set vm No | Out-Null + bcdedit /deletevalue hypervisorlaunchtype | Out-Null + bcdedit /deletevalue vsmlaunchtype | Out-Null + bcdedit /deletevalue vm | Out-Null + bcdedit /set loadoptions DISABLE-LSA-ISO,DISABLE-VBS | Out-Null New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\FVE" | Out-Null -ErrorAction SilentlyContinue Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\FVE" -Name "DisableExternalDMAUnderLock" -Type DWord -Value 0 New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" | Out-Null -ErrorAction SilentlyContinue Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" -Name "HVCIMATRequired" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" -Name "RequirePlatformSecurityFeatures" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" -Name "LsaCfgFlags" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "LsaCfgFlags" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HVCIMATRequired" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "RequirePlatformSecurityFeatures" -Type DWord -Value 0 $ErrorActionPreference = $errpref #restore previous preference } @@ -2959,7 +2846,7 @@ Function DisallowDIP { #Use big system memory caching to improve microstuttering. Function UseBigM { Write-Output "Enabling big system memory caching to improve microstuttering..." - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "LargeSystemCache" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "LargeSystemCache" -Type DWord -Value 0 } #Force contiguous memory allocation in the DirectX Graphics Kernel. @@ -3017,9 +2904,9 @@ Function DecreaseMKBuffer { $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\mouclass\Parameters" | Out-Null -ErrorAction SilentlyContinue - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\mouclass\Parameters" -Name "MouseDataQueueSize" -Type DWord -Value 0x00000010 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\mouclass\Parameters" -Name "MouseDataQueueSize" -Type DWord -Value 0x00000020 New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters" | Out-Null -ErrorAction SilentlyContinue - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters" -Name "KeyboardDataQueueSize" -Type DWord -Value 0x00000010 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters" -Name "KeyboardDataQueueSize" -Type DWord -Value 0x00000020 $ErrorActionPreference = $errpref #restore previous preference } @@ -3251,6 +3138,8 @@ Function NetworkOptimizations { Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSMQ\Parameters" -Name "TCPNoDelay" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Control\Lsa" -Name "LmCompatibilityLevel" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" -Name "EnableAutoDoh" -Type DWord -Value 2 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "MaxNumRssCpus" -Type DWord -Value 4 + Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "DisableTaskOffload" -Type DWord -Value 0 Set-NetTCPSetting -SettingName internet -EcnCapability disabled | Out-Null Set-NetOffloadGlobalSetting -Chimney disabled | Out-Null Set-NetTCPSetting -SettingName internet -Timestamps disabled | Out-Null @@ -3260,11 +3149,33 @@ Function NetworkOptimizations { Set-NetTCPSetting -SettingName internet -MinRto 300 | Out-Null Set-NetTCPSetting -SettingName Internet -AutoTuningLevelLocal normal | Out-Null Set-NetTCPSetting -SettingName internet -ScalingHeuristics disabled | Out-Null - netsh int tcp set supplemental internet congestionprovider=ctcp | Out-Null - Set-NetOffloadGlobalSetting -ReceiveSegmentCoalescing enabled | Out-Null + netsh int ip set global taskoffload=enabled | Out-Null + netsh int tcp set global ecncapability=enabled | Out-Null + netsh int tcp set global rss=enabled | Out-Null + netsh int tcp set global rsc=enabled | Out-Null + netsh int tcp set global dca=enabled | Out-Null + netsh int tcp set global netdma=enabled | Out-Null + netsh int tcp set global fastopen=enabled | Out-Null + netsh int tcp set global fastopenfallback=enabled | Out-Null + netsh int tcp set global prr=enabled | Out-Null + netsh int tcp set global pacingprofile=always | Out-Null + netsh int tcp set global hystart=enabled | Out-Null + netsh int tcp set supplemental internet enablecwndrestart=enabled | Out-Null + netsh int tcp set security mpp=enabled | Out-Null + netsh int tcp set global autotuninglevel=normal | Out-Null + netsh int tcp set supplemental internet congestionprovider=dctcp | Out-Null + Set-NetOffloadGlobalSetting -ReceiveSegmentCoalescing disabled | Out-Null Set-NetOffloadGlobalSetting -ReceiveSideScaling enabled | Out-Null - Disable-NetAdapterLso -Name * | Out-Null - Disable-NetAdapterChecksumOffload -Name * | Out-Null + Enable-NetAdapterChecksumOffload -Name * | Out-Null + Enable-NetAdapterChecksumOffload -Name "*" | Out-Null + Enable-NetAdapterIPsecOffload -Name "*" | Out-Null + Enable-NetAdapterRsc -Name "*" | Out-Null + Enable-NetAdapterRss -Name "*" | Out-Null + Enable-NetAdapterQos -Name "*" | Out-Null + Disable-NetAdapterLso -Name "*" | Out-Null + Enable-NetAdapterEncapsulatedPacketTaskOffload -Name "*" | Out-Null + Enable-NetAdapterSriov -Name "*" | Out-Null + Enable-NetAdapterVmq -Name "*" | Out-Null Set-NetAdapterAdvancedProperty -Name * -DisplayName "Energy-Efficient Ethernet" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Energy Efficient Ethernet" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Energy Efficient Ethernet" -DisplayValue "Off" -ErrorAction SilentlyContinue @@ -3277,11 +3188,32 @@ Function NetworkOptimizations { Set-NetAdapterAdvancedProperty -Name * -DisplayName "Advanced EEE" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "ARP Offload" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "NS Offload" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Large Send Offload v2 (IPv4)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Large Send Offload v2 (IPv6)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "TCP Checksum Offload (IPv4)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "TCP Checksum Offload (IPv6)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "UDP Checksum Offload (IPv4)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "UDP Checksum Offload (IPv6)" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Idle Power Saving" -DisplayValue "Disabled" -ErrorAction SilentlyContinue - Set-NetAdapterAdvancedProperty -Name * -DisplayName "Flow Control" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Flow Control" -DisplayValue "Enabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Flow Control" -DisplayValue "Rx & Tx Enabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Interrupt Moderation" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Reduce Speed On Power Down" -DisplayValue "Disabled" -ErrorAction SilentlyContinue Set-NetAdapterAdvancedProperty -Name * -DisplayName "Interrupt Moderation Rate" -DisplayValue "Off" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Log Link State Event" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Packet Priority & VLAN" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Packet Priority & VLAN" -DisplayValue "Packet Priority & VLAN Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Priority & VLAN" -DisplayValue "Priority & VLAN Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "IPv4 Checksum Offload" -DisplayValue "Rx & Tx Enabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Jumbo Frame" -DisplayValue "Disabled" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Maximum Number of RSS Queues" -DisplayValue "2 Queues" -ErrorAction SilentlyContinue + Set-NetAdapterAdvancedProperty -Name * -DisplayName "Receive Side Scaling" -DisplayValue "Enabled" -ErrorAction SilentlyContinue + Set-NetAdapterRdma -Name "*" -Enabled $True -ErrorAction SilentlyContinue + Set-NetAdapterRsc -Name "*"-IPv4Enabled $True -IPv6Enabled $True -ErrorAction SilentlyContinue + Set-NetAdapterRss -Name "*" -Profile Conservative -ErrorAction SilentlyContinue + Set-NetAdapterIPsecOffload -Name "*" -Enabled $True -ErrorAction SilentlyContinue + Set-NetAdapterChecksumOffload -Name "*" -TcpIPv6Enabled RxTxEnabled -ErrorAction SilentlyContinue + Set-NetAdapterChecksumOffload -Name "*" -IpIPv4Enabled RxTxEnabled -TcpIpv4Enabled RxTxEnabled -UdpIpv4Enabled RxTxEnabled -ErrorAction SilentlyContinue $ErrorActionPreference = $errpref #restore previous preference if ((Get-CimInstance -ClassName Win32_ComputerSystem).PCSystemType -ne 2) { @@ -3310,6 +3242,73 @@ Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters $ErrorActionPreference = $errpref #restore previous preference } +#setting network adabter optimal rss +Function NetworkAdapterRSS { +$errpref = $ErrorActionPreference #save actual preference +$ErrorActionPreference = "silentlycontinue" +Write-Output "Setting network adapter RSS..." + $PhysicalAdapters = Get-WmiObject -Class Win32_NetworkAdapter|Where-Object{$_.PNPDeviceID -notlike "ROOT\*" -and $_.Manufacturer -ne "Microsoft" -and $_.ConfigManagerErrorCode -eq 0 -and $_.ConfigManagerErrorCode -ne 22} + + Foreach($PhysicalAdapter in $PhysicalAdapters) + { + # $PhysicalAdapterName = $PhysicalAdapter.Name + $DeviceID = $PhysicalAdapter.DeviceID + If([Int32]$DeviceID -lt 10) + { + $AdapterDeviceNumber = "000"+$DeviceID + } + Else + { + $AdapterDeviceNumber = "00"+$DeviceID + } + $KeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber" + $KeyPath2 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*RSS\Enum" + $KeyPath3 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*RSS" + $KeyPath4 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*NumRssQueues\Enum" + $KeyPath5 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*NumRssQueues" + $KeyPath6 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*ReceiveBuffers" + $KeyPath7 = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber\Ndi\params\*TransmitBuffers" + + If(Test-Path -Path $KeyPath) + { + new-Item -Path $KeyPath2 -Force | Out-Null + new-Item -Path $KeyPath4 -Force | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*NumRssQueues" -Type String -Value 2 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RSS" -Type String -Value 1 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RSSProfile" -Type String -Value 4 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RssBaseProcNumber" -Type String -Value 2 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*MaxRssProcessors" -Type String -Value 4 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*NumaNodeId" -Type String -Value 0 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RssBaseProcGroup" -Type String -Value 0 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RssMaxProcNumber" -Type String -Value 4 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*RssMaxProcGroup" -Type String -Value 0 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*ReceiveBuffers" -Type String -Value 2048 | Out-Null + Set-ItemProperty -Path $KeyPath -Name "*TransmitBuffers" -Type String -Value 4096 | Out-Null + New-ItemProperty -Path $KeyPath3 -Name "default" -Type String -Value 1 | Out-Null + New-ItemProperty -Path $KeyPath3 -Name "ParamDesc" -Type String -Value "Receive Side Scaling" | Out-Null + New-ItemProperty -Path $KeyPath3 -Name "type" -Type String -Value "enum" | Out-Null + New-ItemProperty -Path $KeyPath2 -Name "0" -Type String -Value "Disabled" | Out-Null + New-ItemProperty -Path $KeyPath2 -Name "1" -Type String -Value "Enabled" | Out-Null + New-ItemProperty -Path $KeyPath4 -Name "1" -Type String -Value "1 Queue" | Out-Null + New-ItemProperty -Path $KeyPath4 -Name "2" -Type String -Value "2 Queue" | Out-Null + New-ItemProperty -Path $KeyPath4 -Name "3" -Type String -Value "3 Queue" | Out-Null + New-ItemProperty -Path $KeyPath4 -Name "4" -Type String -Value "4 Queue" | Out-Null + New-ItemProperty -Path $KeyPath5 -Name "default" -Type String -Value "2" | Out-Null + New-ItemProperty -Path $KeyPath5 -Name "ParamDesc" -Type String -Value "Maximum Number of RSS Queues" | Out-Null + New-ItemProperty -Path $KeyPath5 -Name "type" -Type String -Value "enum" | Out-Null + Set-ItemProperty -Path $KeyPath6 -Name "Max" -Type String -Value 6144 | Out-Null + Set-ItemProperty -Path $KeyPath6 -Name "Default" -Type String -Value 2048 | Out-Null + Set-ItemProperty -Path $KeyPath7 -Name "Max" -Type String -Value 6144 | Out-Null + Set-ItemProperty -Path $KeyPath7 -Name "Default" -Type String -Value 4096 | Out-Null + } + Else + { + Write-Host "The path ($KeyPath) not found." + } + } + $ErrorActionPreference = $errpref #restore previous preference +} + #Remove Edit with 3D Paint Function RemoveEdit3D { Write-Output "Removing Edit with Paint 3D from context menu..." @@ -3363,7 +3362,7 @@ cmd /c 'del /f /q %userprofile%\recent\*.* 2>nul' >$null cmd /c 'del /f /s /q %userprofile%\Local Settings\Temporary Internet Files\*.* 2>nul' >$null $errpref = $ErrorActionPreference #save actual preference $ErrorActionPreference = "silentlycontinue" -Get-ChildItem -Path "$env:temp" -Exclude "dmtmp" | foreach ($_) { +Get-ChildItem -Path "$env:temp" -Exclude "dmtmp" | ForEach-Object ($_) { "CLEANING :" + $_.fullname Remove-Item $_.fullname -Force -Recurse "CLEANED... :" + $_.fullname @@ -3376,11 +3375,15 @@ cmd /c 'echo Temp folders Cleared Successfully!' #Notifying user to reboot! Function Finished { + New-Item -Path "HKCR:\Msi.Package\shell\runas\command" -Force | Out-Null + Set-ItemProperty -Path "HKCR:\Msi.Package\shell\runas" -Name "HasLUAShield" -Type String -Value "" | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKCR:\Msi.Package\shell\runas\command" -Name "(Default)" -Type ExpandString -Value '"%SystemRoot%\System32\msiexec.exe" /i "%1" %*' | Out-Null -ErrorAction SilentlyContinue + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -Type DWord -Value 1 cmd /c 'REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v "Manufacturer" /t REG_SZ /d "This PC is Optimized by DaddyMadu" /f 2>nul' >$null - cmd /c 'REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v "SupportURL" /t REG_SZ /d "http://daddymadu.gg" /f 2>nul' >$null + cmd /c 'REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v "SupportURL" /t REG_SZ /d "https://madu.gg" /f 2>nul' >$null Start-Sleep -s 5 Write-Output "Done! Please Reboot Your PC! Don't forget to follow me on Social Media." - Start "http://daddymadu.gg" + Start-Process "https://madu.gg" } ########## @@ -3390,7 +3393,7 @@ Function Finished { # Relaunch the script with administrator privileges Function RequireAdmin { If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { - Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" $PSCommandArgs" -WorkingDirectory $pwd -Verb RunAs + Start-Process Powershell -Argumentlist '-ExecutionPolicy bypass -NoProfile -command "irm "https://github.com/DaddyMadu/Windows10GamingFocus/raw/master/win10debloatandgamingtweaks.ps1" | iex"' -Verb RunAs Exit } } @@ -3425,41 +3428,6 @@ Function DisableDarkMode { # Debloat Script Additions ########## -Function Stop-EdgePDF { - - #Stops edge from taking over as the default .PDF viewer - Write-Output "Stopping Edge from taking over as the default .PDF viewer" -# Identify the edge application class -$Packages = "HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages" -$edge = Get-ChildItem $Packages -Recurse -include "MicrosoftEdge" - -# Specify the paths to the file and URL associations -$FileAssocKey = Join-Path $edge.PSPath Capabilities\FileAssociations -$URLAssocKey = Join-Path $edge.PSPath Capabilities\URLAssociations - -# get the software classes for the file and URL types that Edge will associate -$FileTypes = Get-Item $FileAssocKey -$URLTypes = Get-Item $URLAssocKey - -$FileAssoc = Get-ItemProperty $FileAssocKey -$URLAssoc = Get-ItemProperty $URLAssocKey - -$Associations = @() -$Filetypes.Property | foreach {$Associations += $FileAssoc.$_} -$URLTypes.Property | foreach {$Associations += $URLAssoc.$_} - -# add registry values in each software class to stop edge from associating as the default -foreach ($Association in $Associations) - { - $Class = Join-Path HKCU:SOFTWARE\Classes $Association - #if (Test-Path $class) - # {write-host $Association} - # Get-Item $Class - Set-ItemProperty $Class -Name NoOpenWith -Value "" - Set-ItemProperty $Class -Name NoStaticDefaultVerb -Value "" - } -} - #Create Restore Point Function CreateRestorePoint { Write-Output "Creating Restore Point incase something bad happens" @@ -3477,7 +3445,7 @@ Function CreateRestorePoint { # Remove-Item -Path C:\Mnt -Recurse Function DebloatAll { -cls +Clear-Host $Bloatware = @( #Unnecessary Windows 10 AppX Apps "*3DBuilder*" @@ -3508,7 +3476,6 @@ cls "*WindowsAlarms*" "*WindowsFeedbackHub*" "*WindowsMaps*" - "*WindowsPhone*" "*WindowsSoundRecorder*" "*MicrosoftOfficeHub*" "*MixedReality.Portal*" @@ -3518,7 +3485,6 @@ cls "Microsoft.549981C3F5F10" "*Advertising.Xaml*" "*SolitaireCollection*" - "*YourPhone*" #Sponsored Windows 10 AppX Apps #Add sponsored/featured apps to remove in the "*AppName*" format @@ -3589,9 +3555,22 @@ If ($args -And $args[0].ToLower() -eq "-preset") { If ($args) { $tweaks = $args If ($preset) { - $tweaks = Get-Content $preset -ErrorAction Stop | ForEach { $_.Trim() } | Where { $_ -ne "" -and $_[0] -ne "#" } + $tweaks = Get-Content $preset -ErrorAction Stop | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" -and $_[0] -ne "#" } + } +} +If ($args) { + $mobiletweaks = $args + If ($preset) { + $mobiletweaks = Get-Content $preset -ErrorAction Stop | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" -and $_[0] -ne "#" } } } # Call the desired tweak functions -$tweaks | ForEach { Invoke-Expression $_ } +$PlatformCheck = (Get-Computerinfo).CsPCSystemType + if ($PlatformCheck -eq "Mobile") { + Write-Output "Platform is $PlatformCheck applying Mobile Devices Tweaks..." + $mobiletweaks | ForEach-Object { Invoke-Expression $_ } + } else { + Write-Output "Platform is $PlatformCheck applying Desktop Tweaks..." + $tweaks | ForEach-Object { Invoke-Expression $_ } + }