Tweaking

Windows is pretty well optimized out-of-the-box for most situations.  You can make it worse!

I stay away from Windows 11!!! What are you doing Microsoft? I get Windows ME/Vista vibes. Anyway I wait for Windows 12. 

Red cross on volume manager


On Windows 10 / 11 you may find your USB audio device is not working and you will see a red cross on the volume icon in the tray.

Try disabling the "Intel® Smart Sound Technology for USB audio" in device manager.

If you experience long connect delay on Bluetooth headsets also disable ""Intel® Smart Sound Technologie voor Bluetooth  audio""



Improve your Windows Manager


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Dwm]

"DisableDrawListCaching"=dword:00000000; (0)

"DisableHologramCompositor"=dword:00000001  ;VR/Steam Hololens?

"DisallowNonDrawListRendering"=dword:00000000 ; (0)

"EnableCpuClipping"=dword:00000000 ;(1)

"EnableDrawToBackbuffer"=dword:0000001 ;(0)

"EnableImageProcessing"=dword:0000001 ;(0)

"EnableMPCPerfCounter"=dword:00000000

"EnableShadow"=dword:0000001 ;(0)

"ForceEffectMode"=dword:00000001 ; opaque windows, transparant taskbar (UseOLEDTaskbarTransparency 0/1 dark/light)

"ImageProcessing8bit"=dword:0000001 ;(0)

"MouseWheelScrollingMode"=dword:0000001 ;0/1/2

"ParallelModePolicy"=dword:00000001 ;4 2 0 ?

"ResampleInLinearSpace"=dword:0000000 ;0/1

"SuperWetEnabled"=dword:00000000  ;(1) ink/tablet?

"TelemetryFramesSequenceMaximumPeriodMilliseconds"=dword:000001f4  ;(1000) 500

"UseHWDrawListEntriesOnWARP"=dword:00000001 ;(0)


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\DWM\ExtendedComposition]

"ExclusiveModeFramerateAveragingPeriodMs"=dword:000000fa ;(1000) 250
"ExclusiveModeFramerateThresholdPercent"=dword:0000002d ;(45)


Improve Windows Explorer


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates]

"CopyNameTemplate"="%s" ;%s (1)

"RenameNameTemplate"="%s" ;%s ()

"ShortcutNameTemplate"="%s" ;%s ()


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"CopyBufferSize"=dword:00100000  ;(0x40000/256Kb) 0x2000/8Kb 0x100000/1Mb (only 3 possibilities) 


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]

"CopyFileBufferedSynchronousIo"=dword:00000040 ;64 streams

"CopyFileChunkSize"=dword:00008000   ; 32KB blocks also see CopyBufferSize

"CopyFileOverlappedCount"=dword:00000020


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]

"DisableProgress"=dword:00000000 ; if copy from MTP device no progress window

New Year and new tweaks 

 

Try these, reboot, and see what it does to your RAM. It should trim your massive WorkingSet down in time.


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]

"CacheUnmapBehindLengthInMB"=dword:00000100 ;256MB for 4GB

"ModifiedWriteMaximum"=dword:00000020 ;32MB for 4GB


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]

"HeapDeCommitFreeBlockThreshold"=dword:00040000 ;(0) free more unused RAM


Healthy 2022!

Windows10UpgradeApp.exe command line options:

/Push /Install /Uninstall /OobeUi /OobeRS2Ui /EosUi /ReUseCatalog /PostEosUi
/TenSUi /PreventWUUpgrade /SetOobeTourniquetRunningRegKey
/SetPriorityLow /UninstallUponExit /UninstallUponUpgrade /ForceUninstall
/MinimizeToTaskBar /ShowProgressInTaskBarIcon /EnableTelemetry
/SkipSelfUpdate /SkipEULA /SkipCompatCheck /QuietInstall /NoRestartUI /SetupFile

Here are some tools.

Windows 10 debloat

OOSU10 (https://www.oo-software.com/en/shutup10)

Debloat Script (https://github.com/Sycnex/Windows10Debloater)

Windows X App Remover  (https://sourceforge.net/projects/windows8appremover/)

Windows 7 idling

Only using 570 Mb RAM and Avast antivirus running.
I'm am using the 32 bit version and only 2.7 Gb RAM available instead of 3.5 Gb due to the NVidia Optimus Video technology on my laptop.

I use PAE for Ramdisk. This holds the pagefile and the Temporary Internet Files for IE and Chrome.
This makes you think what the use of the pagefile is anyway these days.

It is an "obsolete" technology from the Win 3.1 era? Even if you are using 64 bit versions of the Windows OS.

PAE on 32 bit Windows gives you 4 extra address bytes, that would be 36 bits in total. That is enough to address 64 Gb of RAM. Some Windows 2003 versions used it.

Recently I have run 36 bits Windows 32 with a great "just for testing purposes" tool from saferbytes.it and you can download BootkitInstaller from here. When it gives trouble reboot in safe mode and disable it.

Windows 7 - remove the bloatware

I found Windows 7 comes with loads of features that I don't like. Those however are easy removable from the installed OS.

Use the Turn Windows features on or off from the Programs and Features screen.  This is what I ended up with.

Uninstalling Features from the command line

You can do this by using DISM.EXE from the command line: 

DISM /online /Get-Features /Format=Table

DISM /online /Get-Features /Format=Table | find /i "enabled"

 

Disable a Feature:

DISM /online /Disable-Feature /FeatureName:<name of the feature>

 

Enable a Feature:

DISM /online /Enable-Feature /FeatureName:<name of the feature>

You can remove obsolete Service Pack files with DISM.EXE:

DISM /online /Cleanup-Image /SpSuperseded /hidesp

 

Compress only the logfiles:

For /r C:\ %f in (*.log) do compact.exe /c /a /i /q "%f" & echo %f>> c:\temp\logfiles_compressed.txt

or use this cmd file.


The Media features


By removing all the Media related features you need some replacement. For that you can use directshow codecs

and a mediaplayer you like. On the codec side you can use ffdshow or the mpc-hc filters or a combination of both.

As mediaplayer I use two: Winamp for audio and Mpc-hc for movies.

Even after removing the Media features some Microsoft codecs still be present in the OS.

Use these commands to get them disarmed:


REM ### Mpeg4s DMO {2a11bae2-fe6e-4249-864b-9e9ed6e8dbc2} merit 800001

regsvr32 /u /s MP4SDECD.DLL

REM ### Mp3 Decoder DMO {bbeea841-0a63-4f52-a7ab-a9b3a84ed38a}

regsvr32 /u /s mp3dmod.dll

REM ### Mpeg43 Decoder DMO {cba9e78b-49a3-49ea-93d4-6bcba8c4de07} merit 800001

regsvr32 /u /s mp43decd.dll

REM ### Mpeg4 Decoder DMO {f371728a-6052-4d47-827c-d039335dfe0a} merit 800001

regsvr32 /u /s mpg4decd.dll

REM ### Microsoft DTV-DVD Video Decoder {212690FB-83E5-4526-8FD7-74478B7939CD} 

regsvr32 /u /s msmpeg2vdec.dll

REM ### Microsoft DTV-DVD Audio Decoder {E1F1A0B8-BEEE-490D-BA7C-066C40B5E2B9} 

regsvr32 /u /s msmpeg2adec.dll


You can go even further by disabling the Media Foundation codecs too. This is the directshow successor.

And disable the Media Foundation codecs by entering this command: regsvr32 /u /s mf.dll

You can also completely remove the codec and Media Foundation packages. As always create a Restore Point before you do this.

DISM /online /Remove-Package /PackageName:Microsoft-Windows-CodecPack-Basic-Package~31bf3856ad364e35~x86~~6.1.7601.17514

DISM /online /Remove-Package /PackageName:Microsoft-Windows-Foundation-Package~31bf3856ad364e35~x86~~6.1.7601.17514  

(removing the Media Foundation gives permission denied, I'll try to fix that)

Add all packages back to the Online Image (Windows 7):

cd \Windows\servicing\packages

For %f in (Microsoft*.mum) Do DISM /online /add-package /packagepath:%f

In the registry packages are listed here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing


Remove all registered mf.dll explorer shell property handlers to speedup right click on media files:

@echo off

REM HKEY_CLASSES_ROOT\CLSID\{11103421-354C-4CCA-A7A3-1AFF9A5B6701}\InprocServer32

REM     (Default)    REG_EXPAND_SZ    %SystemRoot%\System32\mf.dll

REM 

REM HKEY_CLASSES_ROOT\CLSID\{14DD9A1C-7CFF-41be-B1B9-BA1AC6ECB571}\InprocServer32

REM     (Default)    REG_EXPAND_SZ    %SystemRoot%\System32\mf.dll

Echo %date% > C:\Temp\MF_unregister.log

For /f %%a in ('Reg.exe query HKCR\CLSID /f "\System32\mf.dll" /s') do Call :GetKey %%a

Goto NotFound

:GetKey

Echo %1|find "HKEY_CLASSES_ROOT\CLSID\"

If Errorlevel 1 Goto NotFound

Echo %1 >> C:\Temp\MF_unregister.log

Set KEYFOUND=%1

Set KEYFOUND=%KEYFOUND:\InprocServer32=%

Set KEYFOUND=%KEYFOUND:HKEY_CLASSES_ROOT=HKCR%

Set CLSID=%KEYFOUND:HKCR\CLSID\=%

REM Echo %KEYFOUND%

REM Echo %CLSID%

REM HKCR is not available as location: Powershell.exe rename-item "%KEYFOUND%" %CLSID%.OFF

REG SAVE %KEYFOUND% c:\temp\%CLSID%.hive /y

REG EXPORT %KEYFOUND% c:\temp\%CLSID%.reg /y

REG DELETE %KEYFOUND% /f

:NotFound


If you want to learn more about directshow engine try using GraphStudio for a while. You will see the lego-ish building functions in action.

ps: take ownership of HKCR\CLSID. But add the groups "Users" and "NT SERVICE\TrustedInstaller" before applying permissions!

Windows Search

As for Windows Search? It is powerful but unusable for everyday users. Try Agent Ransack.

I miss my little Doggy from Xp, yes we all do :(

CleanMgr


In time your HDD will be filled with logfiles, dump files, and other temporary files. Since Windows XP there is cleanmgr.exe. This one pops up if your HDD gets low on diskspace. But we don't want the default actions as compressing files etc.

To take things in your own hands there are more powerful options in cleanmgr.exe than meets the eye. 


Setup cleanmgr.exe as follows:


cleanmgr.exe /sageset:1


Now select what you want it to clean up. It will be saved as set 1. Now we want cleanmgr to actually clean it. For that use:


cleanmgr.exe /sagerun:1


Use cleanupmgr.exe /help for some more info. You can schedule cleanmgr.exe /sagerun:1 for running once a week.

 

Note:   Cleanmgr.exe /sageset:1 on XP/W2003 has the Compress Old Files feature.  Beware of that.

Note2: 

Windows 2012 R2 patch cleanup  Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

Use /ResetBase option only if you dont want to rollback patches.

Note: CleanMgr for Windows 2012 R2

Remove Packages


You might have noticed the ridiculous growth in the c:\windows\winsxs folder. This folder holds packages/dll/mui/setup/sp etc. files for Windows 7 OS. 

 

Also you might find foreign language files you don't need:

DISM /online /Get-Packages /Format=Table

And you can remove then with:

DISM /online /Remove-Package /PackageName:<the name from the above command>

You can make a cmd file to get rid of them. An example can be found on my script page: RemovePackages.cmd.

Error 14098? Then WinSxS Component Store damaged. Windows 8 DISM has a repair option and a better Cleanup.

I will see if that can be used on Windows 7 too.


For Windows 8 users:


Dism /Online /Cleanup-Image /ScanHealth

Dism /Online /Cleanup-Image /StartComponentCleanup


For Windows 10 users:


REM ### Remove ALL WIN10 Apps per USER

Powershell.exe "Get-AppxPackage -PackageTypeFilter Bundle | Remove-AppxPackage"

REM ### Remove ALL WIN10 Apps for all users

Powershell.exe "Get-AppxPackage -AllUsers -PackageTypeFilter Bundle | Remove-AppxPackage"

REM ### Remove ALL WIN10 Apps from PC local online DISM store (might still exist per USER)

For /f "tokens=3" %P in ('DISM.exe /Online /Get-ProvisionedAppxPackages^|Findstr PackageName') Do (

   Dism.exe /Online /Remove-ProvisionedAppxPackage /PackageName:%P

)


Reinstall Windows Store

Open Powershell in elevated mode.

Get-Appxpackage -Allusers|Select-String store

Shows:        Microsoft.WindowsStore_11811.1001.18.0_x64__8wekyb3d8bbwe

Get-Appxpackage -Allusers -Name Microsoft.WindowsStore

Shows:

Name                   : Microsoft.WindowsStore

Publisher              : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

Architecture           : X64

ResourceId             :

Version                : 11811.1001.18.0

PackageFullName        : Microsoft.WindowsStore_11811.1001.18.0_x64__8wekyb3d8bbwe

InstallLocation        : C:\Program Files\WindowsApps\Microsoft.WindowsStore_11811.1001.18.0_x64__8wekyb3d8bbwe

IsFramework            : False

PackageFamilyName      : Microsoft.WindowsStore_8wekyb3d8bbwe

PublisherId            : 8wekyb3d8bbwe

PackageUserInformation : {S-1-5-21-1021689206-3676760434-3312906428-2820 [domain\user]: Installed}

IsResourcePackage      : False

IsBundle               : False

IsDevelopmentMode      : False

NonRemovable           : False

Dependencies           : {Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe, Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00_14.0.26706.0_x64__8wekyb3d8bbwe, Microsoft.WindowsStore_11811.1001.18.0_neutral_split.language-nl_8wekyb3d8bbwe}

IsPartiallyStaged      : False

SignatureKind          : Store

Status                 : Ok


Add-AppxPackage -register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_11811.1001.18.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -disabledevelopmentmode

or

Powershell "Get-Appxpackage -Allusers -name Microsoft.WindowsStore|foreach {Add-AppxPackage -DisableDevelopmentMode -Register \"$($_.InstallLocation)\AppXManifest.xml\"}"


Or for another app like Camera:


Get-Appxpackage -Allusers | Select-String camera


Shows:        Microsoft.WindowsCamera_2018.826.78.0_x64__8wekyb3d8bbwe


Add-AppxPackage -register "C:\Program Files\WindowsApps\Microsoft.WindowsCamera_2018.826.78.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -disabledevelopmentmode


Windows 10 Debloat powershell Script


A very good and complete debloat script can be found here: https://github.com/Sycnex/Windows10Debloater

Run the file in a elevated DOS box like:  powershell.exe –ExecutionPolicy Bypass -File Windows10DebloaterGUI.ps1


Windows 10 Remove Windows packages

Create a TXT file with the package names like

*CandyCrush*

*Minecraft*

*MarchofEmpires*

*PhotoshopExpress*

*AutodeskSketchBook*

For new users:

For /f %%f in (%~dp0w10_remove_apps.txt) Do (

  echo %%f

  Powershell.exe "Get-AppxPackage -Name '%%f' -AllUsers | Remove-AppxPackage "

  Powershell.exe "Get-appxprovisionedpackage -online | where-object {$_.DisplayName -like '%%f'} | Remove-AppxProvisionedPackage -online "

)

For existing user remove -AllUsers


Windows 10 register/repair Windows Appx packages


For /f %p in ('dir /b "C:\Program Files\WindowsApps\Microsoft.WindowsStore_*nl*"') do Powershell.exe add-appxPackage -DisableDevelopmentMode -Register  '%p\AppxManifest.xml'


or for all still existing packages in WindowsApps folder (to remove them properly after for example with Windows X App Remover or PowerShell)


For /f "delims=" %p in ('Dir /b /s "C:\Program Files\WindowsApps\AppxManifest.xml" ^| FindStr /V Deleted') Do Powershell.exe Add-AppxPackage -DisableDevelopmentMode -Register '%p'


Remove Windows packages that are not removable with DISM


There are many more packages on your system that are not removable by default. For this purpose you need install_wim_tweak.exe to remove them.

To make all packages visible:  install_wim_tweak.exe /o

Write package list to Packages.txt:  install_wim_tweak.exe /o /l

To remove a package: install_wim_tweak.exe /o /c Microsoft-Windows-Internet-Browser-Package /r   (type a part of the package name=wildcard, be carefull)

You can also set the value Visibility from 2 to 1 on each subkey in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages to make them able to uninstall by DISM. (you need to take ownership first)

DISM /online /Get-Packages

DISM /online /Add-Package /PackageName:Microsoft-Windows-PhotoPremiumPackage~31bf3856ad364e35~amd64~~6.1.7601.17514

DISM /online /Remove-Package /PackageName:Microsoft-Windows-PhotoPremiumPackage~31bf3856ad364e35~amd64~~6.1.7601.17514

Warning: using the install_wim_tweak.exe you can easily corrupt the Software Component Database then Windows update etc won't work anymore. 


Use the Microsoft System Update Readyness Tool (contains CheckSUR.exe) to repair this.  


Windows 7 - Improve performance


Although not slow out of the box it can always be (much) faster. This story can be a very long one but I will try to cut it short.

I will only focus on HDD, RamDisk, Network and (kernel) Memory


The HDD and the RamDisk

With QuietHDD you set your HDD to maximum performance, for both APM and AAM (if applicable for your HDD). This also helps Harddisk clicking noises and prolonging HDD life. This click is the HDD trying to save power at APM values lower than 128. 


My QuietHDD.ini looks like this:

FirstRun = 0

AC_APM_Value = 254

DC_APM_Value = 254

AC_AAM_Value = 254

DC_AAM_Value = 254

AAMEnabled = 1

APMEnabled = 1


To make sure it is started during startup I add a scheduled Task that starts QuietHDD.exe at system startup.

With Gavotte RamDisk you create a HDD in memory. I use drive B: for that. This is even useful on 32bit systems with 2Gb. It can hold your Temporary Internet Files. With 4Gb and more on 32 bit OS you use the 36 bit Physical Address Extension (PAE) so the Ramdisk is loaded in otherwise unused RAM. Even with 64 bit OS this has advantages: less HDD and SSD writes, a clean Internet Cache every time you start your PC.  (32 bit with PAE is 36 bit, which has an address limit of 64 Gb, not 4Gb)

With 4 Gb or more you also want to house the pagefile on the Ramdisk. Also schedule this with Task Scheduler and use addswap.exe from Gavotte.

addswap.exe B:\pagefile.sys 256 1024

Disable the Windows pagefile.


Since Ramdisk space is limited to 512 Mb up to 2Gb (we want some RAM for the OS too) I use Free Download Manager. This will relief the Temporary Internet Files cache where downloads usually stay after the download. Use IE settings to point your Temporary Internet Files to B:\

For Chrome use this registry setting to redirect the cache to the Ramdisk (B:):


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome

"DiskCacheDir"="B:\"

"DownloadDirectory"="C:\TEMP"


To install uBlock Origin as an extension for all:


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist

"1"="cjpalhdlnbpafiamejdnhcphjbkeiagm"


for Edge:


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist

"1"="odfafepnkmbhccpbejgmiehpchacaeak"


You can download the new Chrome policy files direct from Google here. Or type the url chrome://policy in the browser.


Note:  policy values in Chrome are CASE sensitive!!! 


There is also a Google Update policy hidden in the registry. It's update client. You can remove this key:

HKEY_LOCAL_MACHINE\SOFTWARE\<WOW6432Node>\Google\Update\Clients\{430FD4D0-B729-4F61-AA34-91526481799D}

"pv"="1.3.35.452"

and looks like this:

Google Update Policies

Policy name

Policy value

Source

Applies to

Level

Status

AutoUpdateCheckPeriodMinutes

295

Platform

Machine

Mandatory

OK

Show more

InstallPolicy

1

Platform

Machine

Mandatory

OK

Show more

RollbackToTargetVersion

false

Platform

Machine

Mandatory

OK

Show more

UpdatePolicy

1

Platform

Machine

Mandatory

OK

Show more

In the Network and Sharing Center you find Advanced Sharing Settings. Go there and unfold the Home and Work profile. Scroll down and select 40 bits encryption for File Sharing Connections instead of 128 bit. 


Scroll down to HomeGroup connections and select Use user accounts and passwords...

NTFS performance


fsutil.exe usn deletejournal /D C:      (XP for SSD driver in particular, but less robust)

fsutil.exe behavior set DisableEncryption 1

fsutil.exe behavior set DisableLastAccess 1

fsutil.exe behavior set DisableCompression 1

fsutil.exe  behavior set MftZone 2

fsutil.exe  behavior set MemoryUsage 1

fsutil.exe  behavior set DisableDeleteNotify 0

fsutil.exe quota disable C:

fsutil.exe repair set C: 0x9

fsutil.exe resource setautoreset true C:\

chkdsk /L:16384 C:    (for smaller SSD disks, default is 65536 KB)

The Network tweaks

The network on Windows 7 is better than Windows XP SP3. But again a lot can be gained in performance. Try to find if you can use something from my registry tweaks below. (w2k_network_opt.reg) It is also recommend to unbind the QoS Packet Scheduler and if possible Tcpip v6 from your nic.

Make sure you have Turned Off Windows Feature Remote Differential Compression too.

I have also the Home networking disabled.

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup]

"DisableHomeGroup"=dword:00000001

Disable DNS multicasting (LLMNR)

The LLMNR feature (ipv6?) keeps DNS multicasting to find other IP nodes on your subnet. Probably you won't need it. As you can see on the screenshot on the right it doesn't consume much bandwith but in general I don't like multicasts.

To disable use gpedit.msc or put it ion the registry manually :

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DnsClient]

"EnableMulticast"=dword:00000000

Reboot needed.

40-plus percent throughput on 54G WLAN. Not bad with 4 out of 5 bars on the Wifi signal indicator.


Another network settings can be done on the global tcp or ip settings and heuristics with the netsh.exe command.

These settings are stored in the registry in:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]

<multiple values>

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\0]

"0200"=hex:01,01,00,00,02,00,00,00,00,00,00,00,00,00,00,00,1e,00,00,00,00,00,\

  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,\

  ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,\

  ff,ff,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00

"1700"=hex:00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\

  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\

  00,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\

  ff,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00

To reset the tcpip stack to default values:

reset winsock:     netsh winsock reset

reset ip/dhcp:      netsh int ip reset

reset tcp params: netsh int tcp reset

Templates are available for different network scenarios:  netsh interface tcp show supplemental

The TCP global default template is internet

TCP Supplemental Parameters

----------------------------------------------

Minimum RTO (msec)                  : 300

Initial Congestion Window (MSS)     : 10

Congestion Control Provider         : cubic

Enable Congestion Window Restart    : disabled

Delayed ACK timeout (msec)          : 40

Delayed ACK frequency               : 2

Enable RACK                         : enabled

Enable Tail Loss Probe              : enabled

Templates available are: custom, datacenter, automatic, compat, internet

For workstations this is the default: netsh interface tcp set supplemental internet

Get the status of the global tcp: netsh int tcp show global

Receive-Side Scaling State          : enabled

Chimney Offload State               : disabled

NetDMA State                        : disabled <<< EnableTCPA 0 BIOS support Intel I/O Accel. Techn. (I/OAT)

Direct Cache Acess (DCA)            : disabled <<< EnableDca 0

Receive Window Auto-Tuning Level    : normal <<< EnableWsd 0 QualifyingDestinationThreshold ffffffff

Add-On Congestion Control Provider  : none

ECN Capability                      : disabled

RFC 1323 Timestamps                 : disabled <<< Tcp1323Opts 0 (set manually to 1 in TcpIp\Parameters)

Initial RTO                         : 3000


netsh interface tcp set global rss=enabled chimney=disabled netdma=disabled dca=disabled autotuninglevel=normal

netsh interface tcp set global congestionprovider=none ecncapability=disabled timestamps=disabled 

netsh interface tcp set global initialrto=3000

Heuristic tcp settings: netsh interface tcp show heuristics

Window Scaling heuristics         : enabled

Qualifying Destination Threshold  : 3

Profile type unknown              : normal

Profile type public               : normal

Profile type private              : normal

Profile type domain               : normal


netsh interface tcp set heuristics disabled

netsh interface tcp set heuristics wsh=enabled


Other ip releated settings: netsh int ip show global

General Global Parameters

---------------------------------------------

Default Hop Limit                   : 64 hops

Neighbor Cache Limit                : 4096 entries per interface

Route Cache Limit                   : 128 entries per compartment

Reassembly Limit                    : 22365344 bytes

ICMP Redirects                      : enabled

Source Routing Behavior             : dontforward

Task Offload                        : enabled

Dhcp Media Sense                    : enabled

Media Sense Logging                 : disabled

MLD Level                           : all

MLD Version                         : version3

Multicast Forwarding                : disabled

Group Forwarded Fragments           : disabled

Randomize Identifiers               : enabled

Address Mask Reply                  : disabled

Current Global Statistics

---------------------------------------------

Number of Compartments              : 1

Number of NL clients                : 7

Number of FL providers              : 4


netsh interface ip set global neighborcachelimit=4096     (def 256, increase the ARP cache size)

netsh interface ip set global defaultcurhoplimit=64          (max number of hops, read routers to endpoint)

netsh interface ip set global taskoffload=enabled mediasenseeventlog=disabled ...

Set the ARP cache life time in Vista+ (no registry entry for this)

netsh interface ipv4 show interfaces   -> get NIC interface number, e.g. 15    (ArpCacheLife reg value last present in XP/W2003)

netsh interface ipv4 show interface 15


Interface Wireless Network Connection Parameters

----------------------------------------------

IfLuid                             : wireless_0

IfIndex                            : 15

State                              : connected

Metric                             : 25

Link MTU                           : 1500 bytes

Reachable Time                     : 4428000 ms

Base Reachable Time                : 3600000 ms

Retransmission Interval            : 500 ms

DAD Transmits                      : 2

Site Prefix Length                 : 64

Site Id                            : 1

Forwarding                         : disabled

Advertising                        : disabled

Neighbor Discovery                 : enabled

Neighbor Unreachability Detection  : enabled

Router Discovery                   : disabled

Managed Address Configuration      : enabled

Other Stateful Configuration       : enabled

Weak Host Sends                    : disabled

Weak Host Receives                 : disabled

Use Automatic Metric               : enabled

Ignore Default Routes              : disabled

Advertised Router Lifetime         : 1800 seconds

Advertise Default Route            : disabled

Current Hop Limit                  : 0

Force ARPND Wake up patterns       : disabled

Directed MAC Wake up patterns      : disabled


netsh interface ipv4 set interface 14 basereachable=3600000  -> set life time to minimal 60/2=30 minute


Disable network Memory Pressure Protection (enable DDOS defense only when this is internet server):

netsh int tcp set security mpp=disabled

netsh int tcp set security profiles=disabled


With High CPU on iphlpsvc then disable 6to4 function (or when using private IP):

netsh int ipv6 6to4 set state disabled


Winsock auto tuning on:

netsh winsock set autotuning on


For 2012 R2 Hyper-V servers:

netsh int tcp set security mpp=disabled

netsh int tcp set security profiles=disabled

netsh int tcp set supplemental template=datacenter

netsh int tcp set global rss=enabled

netsh int tcp set global chimney=default

netsh int tcp set global netdma=default

netsh int tcp set global dca=default

netsh int tcp set global autotuninglevel=restricted

netsh int tcp set global ecncapability=default

netsh interface tcp set heuristics disabled

netsh interface tcp set heuristics wsh=enabled

netsh interface ip set global neighborcachelimit=4096 defaultcurhoplimit=64 taskoffload=enabled

reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\Ndis\Parameters /f /v RssBaseCpu /t REG_DWORD /d 0

reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\Ndis\Parameters /f /v MaxNumRssCpus /t REG_DWORD /d 8 

Extra settings for 2016/19 Hyper-V servers (and Win 10):

netsh interface tcp set global hystart=disabled

netsh interface tcp set global fastopen=enabled

netsh interface tcp set global pacingprofile=slowstart

Get more network (TCP/IP) settings with PowerShell in WIN10:

Powershell.exe

Get-NetTCPSetting

Get-NetOffloadGlobalSetting

Get-Net6to4Configuration

Get-NetIPv4Protocol

Get-NetAdapterPowerManagement

Other interesting tcpip registry values (win7+):

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters]

"AllowUnqualifiedQuery"=dword:00000001                # allow DNS query without domain name

"DefaultTTL"=dword:00000040                                  # 64 hops

"DisableMediaSenseEventLog"=dword:00000001       # no entry in eventlog of cable (dis-)connect

"DisableRss"=dword:00000000                                 # disable Receiver Side Scaling tcp windows

"DisableTaskOffload"=dword:00000000                    # disable task offloading to nic

"DisableTcpChimneyOffload"=dword:00000000        # disable chimney offload

"DnsOutstandingQueriesCount"=dword:000003e8    #

"DnsQueryTimeouts"=REG_MULTI_SZ:"1 1 2 2 4 0"    # don't wat too long for DNS server response

"EnableAddrMaskReply"=dword:00000000                # dont reply to subnet pings

"EnableBcastArpReply"=dword:00000000                  # dont reply to arp broadcast requests

"EnableConnectionRateLimiting"=dword:00000000    # bypass the limitation on half open tcp

"EnableDca"=dword:00000000                                   # enable Direct Cache Access from nic to cpu

"EnableHeuristics"=dword:00000001                          # let windows tcp find optimum, works with Chimney offload

"EnableIPAutoConfigurationLimits"=dword:00000000 # no auto ip from microsoft

"EnableTCPA"=dword:00000000                                # enable Net DMA

"EnableWsd"=dword:00000000                                  # enable Windows Scaling Diagnostics, choppy flash video if enable!!!

"IPEnableRouter"=dword:00000000                            # don't discover routers

"QualifyingDestinationThreshold"=dword:ffffffff        # QOS no threshold

"StrictTimeWaitSeqCheck"=dword:00000001            # does activate TcpTimedWaitDelay (only from win8+?)

"SynAttackProtect"=dword:00000001                       # protect against syn flood (DOS) attacks

"Tcp1323Opts"=dword:00000001                            # windows scaling (1) and timestamps (2)

"TCPMaxDataRetransmissions"=dword:00000002   # limit the max nr of data retransmissions 

"TcpTimedWaitDelay"=dword:0000001e                  # wait 30 secs before closing inactive connection (StrictTimeWaitSeqCheck 1)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\<UID>]

"TcpAckFrequency"=dword:00000001                      # def 2 outstanding ACKS. Use 5 for 100Mbit, 13 for 1Gbit network connection (1 beats timeouts Outlook)

"TcpDelAckTicks"=dword:00000000                        # Disable Nagling

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NDIS\Parameters]

"RssBaseCpu"=dword:00000000                             # start with CPU1 for RSS (to let CPU0 do other important things)

"MaxNumRssCpus"=dword:00000001                    # (4)  (2=server, 1=workstation) Receive Side Scaling to one CPU (all cores)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]

"FastCopyReceiveThreshold"=dword:000005dc       # UDP streaming threshold 1500 bytes/s

"FastSendDatagramThreshold"=dword:000005dc    # UDP streaming threshold 1500 bytes/s

With NDIS 6 NIC drivers you can enable TaskOffload via the registry too. 

Find the proper Nic key under:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00xx]

"*SpeedDuplex"="0"                           # auto negotiate

"*FlowControl"="3"                            # Rx & Tx Enabled

"*RSS"="1"                                         # Enabled

"*TCPConnectionOffloadIPv4"="1"    # Enabled

"*TCPConnectionOffloadIPv6"="1"    # Enabled

"*IPChecksumOffloadIPv4"="3"         # Rx & Tx Enabled

"*TCPChecksumOffloadIPv4"="3"      # Rx & Tx Enabled

"*TCPChecksumOffloadIPv6"="3"      # Rx & Tx Enabled

"*UDPChecksumOffloadIPv4"="3"      # Rx & Tx Enabled

"*UDPChecksumOffloadIPv6"="3"      # Rx & Tx Enabled

"*LsoV1IPv4"="1"                               # Enabled

"*LsoV2IPv4"="1"                               # Enabled

"*LsoV2IPv6"="1"                               # Enabled

"*TCPUDPChecksumOffloadIPv4"="3"    # Rx & Tx Enabled

"*TCPUDPChecksumOffloadIPv6"="3"    # Rx & Tx Enabled

Note: Large Scale Offload (LSO) is buggy on a lot of NIC's. You can disable it with these commands:

Win2k3:  reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v EnableTCPChimney  /t REG_DWORD /d 0

Vista+:   netsh.exe interface tcp set global chimney=disabled

Some handy WLAN netsh commands:

netsh.exe wlan show interfaces                         # speed and signal strength current connection

netsh.exe wlan show networks mode=Bssid     # show all networks and properties

Note1: You can do it the easy way with SG TCP Optimizer. More info op SpeedGuide.

Windows 7 - Create Wifi Hotspot / share your Wifi connection

Windows 7 has a builtin host function for Wifi. This is why the "Microsoft Virtual WiFi Miniport Adapter" will show when you have a wlan network card.

Enabling the host function is very simple. Open elevated command prompt:


netsh.exe wlan set hostednetwork mode=allow ssid="myssid" key="password"

netsh.exe wlan start hostednetwork


Check status with: netsh.exe wlan show hostednetwork

When the host function in running you can share the Wifi. Select the Wifi adapter and right click and select Properties. Goto the Sharing tab and enable "Allow other network users..." Select the Microsoft Virtual Wifi Miniport as Home networking Connection.

Note: This will only work if you have the Firewall and ICS service running.

Windows 7 - Management Console Snapins

To speed up and revert back to old school mmc snapins we need to get rid of that task pane. I don't like it, it adds nothing. But that is easy solved.

Start regedit and take ownership and full permissions of the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC then rename the key UseNewUI to UseNewUI.OFF

To disable the task pane on every snapin run the mmc_SuppressActionPane.cmd script.

Windows 7 - Explorer, no single row select and custom CMD bar


On the image right you see the effect of disabling FullRowSelect. This is done in the user part of the registry. Also you see that the CMD bar is altered with other commands.

One advantage is that you have more space in the explorer window to right click. You can enable it by running the DisableFullRowSelect.reg file. Instructions are in the reg file.

 

Beside that I find it very convenient to add some commands to the CMD bar of explorer. These commands are folder type specific. By disabling FullRowSelect we have reset to the Generic folder.

Now we can customize the CMD bar with the expl_cmdbar.reg file. You need to take ownership and full permissions of the registry key used in the file first.type. All possible command can be found in the registry. Use microsoft subinacl.exe like this:

subinacl.exe /subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell /setowner=builtin\administrators

Windows 7 - Cleaning the Tree

Since Windows 95 we have PnP. Plugin in some hardware and the PnP system finds the driver in c:\windows\inf or from your local media, later even from Windows Update. The major flaw with this system up to today is that if hardware is removed it never asks the question "Should I remove the driver now too?". So after a few years you system is cluttered with old device drivers. This slows down your system a fraction. No real big deal but lets do some good housekeeping.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"devmgr_show_nonpresent_devices"="1"  ;  with Show hidden devices in View menu  it show nonpresent devices
"devmgr_show_drivers"="1"  ;NEW!!! 2 options in View menu of device manager like Windows 11

Now start the Device Manager and select from the View menu Show hidden devices.

You will also see things like Volume Shadow Copies.

Goto the top of the tree and press * (asterisk) on you numeric keypad. The tree unfolds. Now look for grayed devices. They are not on your system.

Press delete to remove them.

Don't do this for the "Sound, Video and Game controllers" or there must be some old sound board present.

In general you can do this for mouse(hid), keyboards, disks and disk controllers, usb, network, modems, etc.

In PnP language the main groups (e.g. Network Adapters) are classes with a corresponding ClassGUID. The Network Adapter Class has a GUID of  {4D36E972-E325-11CE-BFC1-08002BE10318}. See Plug and Play below.

You can also use a tool called Device Cleanup from Uwe Sieber. (read DeviceCleanup.txt in the zip)

Windows 7 - Plug and Play

It roughly works as follows:

From point 6 it is different for every device class.

ps: the inf folder is pointed at by HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion DevicePath. You can use ; to point to separate multiple paths. In older versions of Windows it was possible to trigger a new PnP Device enumeration process with RunDll32.exe SysSetup.dll,UpdatePnpDeviceDrivers but the new SysSetup.dll doesn't provide that anymore.

You can add drivers to your system with pnputil.exe. For example: pnputil.exe -a a:\usbcam\USBCAM.INF

Windows 7 - Explorer sub directory names with dots bug

In some cases Explorer in Windows 7 shows multiple subfolders with dots in the name are truncated. VERY annoying and still not solved by Microsoft. 

After searching what is causing this I think I found the problem. Process Separation. 

I could only reproduce this if I had SeparateProcess in the registry at value 1. There are two places where you can set it:

HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\SeparateProcess dword 0x0

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SeparateProcess dword 0x0

Another thing I noticed is that Explorer (when separated) is listed in the TaskMgr with different command line options:

%SystemRoot%\explorer.exe /factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b}    (CLSID_SeparateMultipleProcessExplorerHost)

%SystemRoot%\explorer.exe /factory,{ceff45ee-c862-41de-aee2-a022c81eda92}       (CLSID_SeparateSingleProcessExplorerHost)

If you see these then you have Process Separation on and likely run into the Explorer sub folder dot bug.

Solution that did not work but on the internet like here on microsoft:

Close all Explorer windows. On the taskbar you should see the Explorer icon. Hold Shift and Left click on it. Select properties.

Change the Shortcut Target from

%windir%\explorer.exe

to

%windir%\explorer.exe /n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Or modify C:\Users\<username>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer

and login in again.

Windows - Smb Drive Mapping Reconnect Timeout at Logon or with Explorer

One very annoying feature is the timeout in Windows Explorer before detecting that the Drive Mapping is no longer valid. The default timeout is 60 seconds and is not documented for windows anywhere. After searching the dll's and drivers in Windows 7 for strings I found ReconnectTimeout in the driver mrxsmb10.sys and mpr.dll

If your network connections must be restored after login set Restore to 1.

;### kill the long "restoring network connections" at logon (defer=ghosted connections)

;### Only works for mappings after these settings applied

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider]

"RestoreConnection"=dword:00000000 ; (0=no direct attempt, click it, no notification, if defer=1 then wait RestoreTimeout msec)

"RestoreTimeout"=dword:00004e20    ; (0 or 60.000) try for 20.000 milliseconds to reconnect at logon

"DeferConnection"=dword:00000001   ; If RestoreConn=0 wait until RestoreTimeout


;### network drive map timeout for ReconnectableServers (def is 60 sec)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters]

"ReconnectTimeout"=dword:00000005


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\SharedAccessConnection]

"EnableControl"=dword:00000001

"DeviceTimeout"=dword:000003e8


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]

"NetLinkTimeout"=dword:000003e8 ;7500 (now 1000 msec)

Note: if you have ReconnectableServers (REG_MULTI_SZ) listed in HKLM\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters explorer will always try to connect. If your network connection drops and you click on a network drive it will keep trying until the connection is online again.

You may also need to take a look at your "MyComputer" Namespaces in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace

More info: http://support.microsoft.com/kb/828753 and http://msdn.microsoft.com/en-us/library/windows/desktop/aa378818(v=vs.85).aspx

http://blogs.msdn.com/b/openspecification/archive/2013/03/19/cifs-and-smb-timeouts-in-windows.aspx

Disable SMB2 or SMB3 on Windows workstation

For some situations you might want to disable the SMB2 or SMB3 protocol. SMB2 adds new features to the SMB/CIFS network protocol that won't add anything if your other network devices, like older NAS, doesn't support them. Better switch the SMB2 off on your workstation.

sc.exe config lanmanworkstation depend= browser/mrxsmb10/nsi 

sc.exe config mrxsmb20 start= disabled

or even SMB3 in Windows 8

sc.exe config lanmanworkstation depend= browser/mrxsmb10/nsi

sc.exe config mrxsmb30 start= disabled

To enable them again add mrxsmb20 and mrxsmb30 back to the dependencies and set the start to auto (3) again.

sc.exe config lanmanworkstation depend= browser/mrxsmb10/mrxsmb20/nsi 

sc.exe config mrxsmb20 start= demand

Disable SMB2 and SMB3 on Windows server

You can easily disable SMB2 and SMB3 using the registry.

Reg.exe Add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v SMB2 /t REG_DWORD /d 0 /f

After that done restart the server service.

See https://support.microsoft.com/en-us/kb/2696547

SMB Performance tweaks with Powershell

Powershell.exe Get-SmbClientConfiguration

Powershell.exe Get-SmbServerConfiguration

File server:

Powershell.exe "Set-SmbServerConfiguration -EnableMultiChannel $true -force"

Powershell.exe "Set-SmbServerConfiguration -EnableOplocks $true -force"

Powershell.exe "Set-SmbServerConfiguration -ServerHidden $true -force"

Powershell.exe "Set-SmbServerConfiguration -IrpStackSize 20 -force"

Powershell.exe "Set-SmbServerConfiguration -MaxMpxCount 4096 -force"

Powershell.exe "Set-SmbServerConfiguration -MaxWorkItems 16384 -force"

Powershell.exe "Set-SmbServerConfiguration -MaxSessionPerConnection 16384 -force"

Powershell.exe "Set-SmbServerConfiguration -EnableSMB1Protocol  $true -force"        <---- consider $false here

Powershell.exe "Set-SmbServerConfiguration -EnableSMB2Protocol $true -force"

Powershell.exe "Set-SmbServerConfiguration -TreatHostAsStableStorage $true -force"

Powershell.exe "Set-SmbServerConfiguration -EncryptData $false -force"

Clients:

Powershell.exe "Set-SmbClientConfiguration -EnableBandwidthThrottling $false -force"

Powershell.exe "Set-SmbClientConfiguration -EnableLargeMtu $true -force"

Powershell.exe "Set-SmbClientConfiguration -EnableLoadBalanceScaleOut $true -force"

Powershell.exe "Set-SmbClientConfiguration -EnableMultiChannel $true -force"

Powershell.exe "Set-SmbClientConfiguration -EnableSecuritySignature $false -force"

Powershell.exe "Set-SmbClientConfiguration -MaxCmds 16384 -force"

Powershell.exe "Set-SmbClientConfiguration -MaximumConnectionCountPerServer 32 -force"

Powershell.exe "Set-SmbClientConfiguration -OplocksDisabled $false -force"

Powershell.exe "Set-SmbClientConfiguration -RequireSecuritySignature $false -force"

Powershell.exe "Set-SmbClientConfiguration -UseOpportunisticLocking $true -force"

Powershell.exe "Set-SmbClientConfiguration -WindowSizeThreshold 2 -force"         <-- Maybe 4 (def 8 on client)

Network Location Awareness and consequences

You know that the network icon in the system tray shows a Wifi or a Network cable icon. When a network card is powered on windows tries to determine on which kind of network you are. There are some consequences that can catch you off guard. 

A wrong NLA detections can set your Windows Firewall from Domain to Public which causes AD communication problems and long PC startup times! 

Extra registry settings for NLA service:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NlaSvc\Parameters]

"ShowDomainEndpointInterfaces"=dword:00000001


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NlaSvc\Parameters\Internet]

"EnableActiveProbing"=dword:00000000

"EnableNoGatewayLocationDetection"=dword:00000001

"CorpLocationProbeTimeout"=dword:0000001E    ; Setting it to short causes Firewall/AD problems due to wrong NLA Network location.

Tweaking CPU's and RAM

From experience I found that on 32 and 64 bit systems there is only little to gain from tweaking the kernel of Windows. But still some can be done to optimize and gain some more speed.

By default the Win32PrioritySeparation is set at 2. You can change it via the GUI for best foreground 0x26 (workstation) or best background 0x18 (server). You can set it manual like this:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl]

;"Win32PrioritySeparation"=dword:00000018 ;server

"Win32PrioritySeparation"=dword:00000026  ;workstation, however I find 0x14 also a good working value

To play with these values there is a free addon in ProcessLasso called TweakScheduler.exe

For memory management it is also possible to gain a little advantage over the default values set out of the box. See below for best settings:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]

"DisablePagingExecutive"=dword:00000001

"LargeSystemCache"=dword:00000000 ; 1 for server

"MapAllocationFragment"=dword:00020000 ; 128Kb, def 64Kb for sys over 1 Gb

"PhysicalAddressExtension"=dword:00000001

"SystemCacheLimit"=dword:00000200 ; 512 Mb, set to 400 for 64bits > 4 Gb RAM

"SystemPages"=dword:00000000 ; let windows calculate

You might want to turn Prefetch and Superfetch functions off as well. To much that can go wrong with them and consuming too much memory.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters]

"EnablePrefetcher"=dword:00000002 ; only for booting

"EnableSuperfetch"=dword:00000000 ; not advised/needed when using SSD

Disable the SuperFetch service: (also Prefetcher, ReadyBoost, ReadyBoot, etc...)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SysMain]

"Start"=dword:00000004 ; disable startup of the Superfetch service
or
sc config sysmain start= disabled

Superfetch might be needed for RAM compression in Windows 10 (if you want that?).

ReadyBoost is also such a memory hog. Switch it off like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EMDMgmt]

"GroupPolicyDisallowCaches"=dword:00000001

"AllowNewCachesByDefault"=dword:00000000


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\rdyboost]

"Start"=dword:00000000  ; Don't disable startup (4) of the ReadyBoost service, give you BSOD at boot time!

My memory tweaks for the Windows 7 OS you find below in the list (w2k_sess_mem_opt.reg) 

More control over Windows Cache in RAM with DynCache (Win7)

A lot of RAM is used for caching purposes () which is generally a good thing to speed up the Windows OS. However on modern workstations with fast SSD we don't need all that cache if we prefer to have more RAM. Windows regulates the Cache amount itself but is kinda lazy.

In the registry we see the SystemCacheLimit value under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management that limited the Cache (still working?)

This is a typical RAM overview running windows using RAMMap utility:

Empty Workingset with Rammap: Rammap.exe -Ew 

Disable tracing and logging of system startups

Hidden Power options

@echo off

Title Make all PowerSettings visible...

Echo REGEDIT4 >%~dp0PowerSett_Attrib_Restore.reg

Echo. >>%~dp0PowerSett_Attrib_Restore.reg

For /f %%K in ('Reg.exe query HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings /s /v "Attributes"^|FindStr HKEY_') do (

Reg.exe add %%K /v Attributes /t REG_DWORD /d 0 /f

Echo [%%K] >> %~dp0PowerSett_Attrib_Restore.reg

Echo "Attributes"=dword:00000001 >> %~dp0PowerSett_Attrib_Restore.reg

Echo. >> %~dp0PowerSett_Attrib_Restore.reg

)

Now open from the Control Panel the Power Options, Change plan settings, Change advanced power settings. You will see plenty more options now.

Before you change anything do export the windows standard settings first for backup:

POWERCFG -EXPORT c:\temp\Power_saver.pow            scheme_max

POWERCFG -EXPORT c:\temp\Balanced.pow                  scheme_balanced

POWERCFG -EXPORT c:\temp\High_performance.pow   scheme_min

Export your power settings to a file:       POWERCFG -EXPORT c:\temp\HiPerf_PowerScheme.pow scheme_current

Import your power settings from a file:   POWERCFG -IMPORT c:\temp\HiPerf_PowerScheme.pow

I have done some work on the Performance Power Scheme that is now running on my laptop and many other PC's: Tweakradje_Hiperf.zip

This gives a big powersaving on yearly basis at almost no performance loss!!!

You can import it and try it. Instructions and all settings text file are inside the zip.

(ps: a good power scheme for windows 2003 and Xp is Win2k3_XP_Pwr_Scheme_Server_Balanced.reg - Readme inside)

Reset or Restore Power Schemes to defaults

Restore all:           (deletes your custom ones!)
powercfg /restoredefaultschemes

Restore per scheme:

powercfg /restoreindividualdefaultscheme scheme_min

powercfg /restoreindividualdefaultscheme scheme_balanced

powercfg /restoreindividualdefaultscheme scheme_max

When not visible in Power settings control panel:

powercfg /duplicatescheme scheme_min

powercfg /duplicatescheme  scheme_balanced

powercfg /duplicatescheme scheme_max

Or set from command line:

powercfg /setactive scheme_min

powercfg /setactive scheme_balanced

powercfg /setactive scheme_max

Windows 10 adds a new scheme, Ultimate Performance:  

Make visible in windows:

powercfg /duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

Or set on the commandline:

powercfg /setactive e9a42b02-d5df-448d-aa00-03f14749eb61

Windows 10 also adds a Power Slider when you click the Battery icon in the systray. This is for fine tuning the "PerfEnergyPreference" setting. These are called OVERLAYS.

The current power scheme must be set to Balanced.

NOTE: after upgrading from Windows 7 the power slider maybe missing! Even when you selected Balanced. Use the regfile from the downloads below to get it back!

( Win10_power_settings_overlay_missing.reg )

We have 3 overlays (AC 3 settings, DC 4 settings):

OVERLAY_SCHEME_HIGH   (slider AC right, DC left )

OVERLAY_SCHEME_MIN     (slider AC left, DC middle left)

OVERLAY_SCHEME_NONE  (slider AC middle, DC middle right)

OVERLAY_SCHEME_MAX    (slider AC right, DC right)

You can activate the overlays with this command for the SCHEME_BALANCED Power Profile:

Powercfg.exe /OverlaySetActive OVERLAY_SCHEME_NONE

To check all scheme settings use: Powercfg.exe /qh > settings.TXT

A little more info here at Miscrosoft: https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/customize-power-slider

A quick and diry way for testing PC performance is using winsat.exe from the commandline: winsat.exe formal -restart clean

You can compare the results with defferent power schemes.

Windows 10 Power Scheme setting changes to current profile (prefer Balanced)

The goal is to have a snappy response and good performance and at the same time save power with CPU core parking.

Windows 10 from 1803 on laptops you need balanced! Only then you get the "Energy Slider" when you click the battery icon in the systray.

@echo off

REM ### Windows 10 def power scheme is Balanced, reset and select it (updated to version W10 20H2)

REM ### AC = power supply

REM ### DC = battery

REM ### Restore aff schemes (deletes all user schemes too)

powercfg /restoredefaultschemes

REM ### create a GUI visible other schemes in win10 (incl Ultimate Performance)

powercfg /duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

powercfg /duplicatescheme scheme_min

powercfg /duplicatescheme scheme_max

REM ### Restore only balanced scheme (in case above is not used)

powercfg /restoreindividualdefaultscheme scheme_balanced

powercfg /setactive scheme_balanced

REM ### Brightness screen ac=100 dc=80 (No alias?)

powercfg /setACvalueindex scheme_current SUB_VIDEO aded5e82-b909-4619-9949-f5d71dac0bcb 100

powercfg /setDCvalueindex scheme_current SUB_VIDEO aded5e82-b909-4619-9949-f5d71dac0bcb 80

powercfg /setactive scheme_current

REM ### Selective USB Suspend (No aliases?)

powercfg /setACvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0

powercfg /setDCvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1

REM ### USB3 Power management (0..3 off/min/mod/max)

powercfg /setACvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 1

powercfg /setDCvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 2

REM ### Allow Wake Timers (sleep) 0=off 1=on (DC def)  2=only important (like in Task Scheduler,Maintanance etc)

powercfg /setACvalueindex scheme_current SUB_SLEEP RTCWAKE 0

powercfg /setDCvalueindex scheme_current SUB_SLEEP RTCWAKE 0

REM ### Power Button is Off

powercfg /setACvalueindex scheme_current SUB_BUTTONS PBUTTONACTION 3

powercfg /setDCvalueindex scheme_current SUB_BUTTONS PBUTTONACTION 3

REM ### Network conn in Standby mode 0=off 1=on 2=lidclosed

powercfg /setACvalueindex scheme_current SUB_NONE CONNECTIVITYINSTANDBY 1

powercfg /setDCvalueindex scheme_current SUB_NONE CONNECTIVITYINSTANDBY 1

REM ### Don't sleep CPU with open file connections. They will be disconnected!!!

powercfg /setACvalueindex scheme_current SUB_SLEEP REMOTEFILESLEEP 0

powercfg /setDCvalueindex scheme_current SUB_SLEEP REMOTEFILESLEEP 0

REM ### Don't allow standby mode on AC? Above setting is not applicable then!

powercfg /setACvalueindex scheme_current SUB_SLEEP ALLOWSTANDBY 1

powercfg /setDCvalueindex scheme_current SUB_SLEEP ALLOWSTANDBY 1

REM ### Sleep AC=never DC=30 minutes

powercfg /setACvalueindex scheme_current SUB_SLEEP STANDBYIDLE 0

powercfg /setDCvalueindex scheme_current SUB_SLEEP STANDBYIDLE 1800

REM ### No Hybrid Sleep on DC (We disable Hibernate with "powercfg /h off" as well)

powercfg /setACvalueindex scheme_current SUB_SLEEP HYBRIDSLEEP 0

powercfg /setDCvalueindex scheme_current SUB_SLEEP HYBRIDSLEEP 0

REM ### Hibernate timeout AC 12 hours, DC 3 hours

powercfg /setACvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 43200

powercfg /setDCvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 10800

REM ### Make the CPU freq more responsive to load in current scheme

REM ### Ideal/Single/Rocket/IdealAggressive = 0/1/2/3

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFINCPOL 3

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PERFDECPOL 1

REM ### deal with pci irq steering only 5=on only CPU0 3=any unparked cpu 4=any cpu 0=standard

powercfg /setACvalueindex scheme_current SUB_INTSTEER MODE 3

powercfg /setDCvalueindex scheme_current SUB_INTSTEER MODE 3

REM ### PCI Pwr save Off normal max

powercfg /setACvalueindex scheme_current SUB_PCIEXPRESS ASPM 0

powercfg /setDCvalueindex scheme_current SUB_PCIEXPRESS ASPM 1

REM ### CPU Perf Boost mode: 0..6 Disabled/Enabled/Aggressive/Efficient Enabled/Efficient Aggressive/Aggressive At Guaranteed/Efficient Aggressive At Guaranteed

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFBOOSTMODE 2

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PERFBOOSTMODE 2

powercfg /setactive scheme_current

REM ### CPU Cores minimum 25% on AC 10% on battery

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES 25

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR CPMINCORES 10

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES1 25

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR CPMINCORES1 10

REM ### Allow CPU to Throttle/PARK

powercfg /setACvalueindex scheme_current SUB_PROCESSOR IDLEDISABLE 0

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR IDLEDISABLE 0

REM ### Allow CPU throttle states AC 2=automatic Battery 1=On

powercfg /setACvalueindex scheme_current SUB_PROCESSOR THROTTLING 1

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR THROTTLING 1

REM ### When park CPU what is lowest state (0..2) No Pref/Deepest/Lightest

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPPERF 1

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR CPPERF 1

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPPERF1 1

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR CPPERF1 1

REM ### Minimum/Maximum CPU state when not parked

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMIN 5

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMIN1 5

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMAX 100

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMAX1 100

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMIN 5

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMIN1 5

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMAX 100

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMAX1 100

REM ### Proc Thread Scheduling policy (0..5) 5=Prefer efficient CPU 3=Prefer performant CPU

powercfg /setACvalueindex scheme_current SUB_PROCESSOR SCHEDPOLICY 3

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR SCHEDPOLICY 5

powercfg /setACvalueindex scheme_current SUB_PROCESSOR SHORTSCHEDPOLICY 3

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR SHORTSCHEDPOLICY 5

REM ### System Cooling policy 0=passive 1=active

powercfg /setACvalueindex scheme_current SUB_PROCESSOR SYSCOOLPOL 1

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR SYSCOOLPOL 0

REM ### GPU graphics card turn down on battery 0=none 1=Low Power

powercfg /setDCvalueindex scheme_current SUB_GRAPHICS GPUPREFERENCEPOLICY 1

REM ### Number of history time intervals for avarage

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFHISTORY 3

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PERFHISTORY 3

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFHISTORY1 3

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PERFHISTORY1 3

REM ### Pref for new threads 0=all cpu 1=fast cpu 2=pref fast cpu 3=effic cpu 4=pref effic cpu 5=auto

powercfg /setACvalueindex scheme_current SUB_PROCESSOR SCHEDPOLICY 2

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR SCHEDPOLICY 4

REM ### Time intervals for dec perf

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFDECTIME 2

powercfg /setDCvalueindex scheme_current SUB_PROCESSOR PERFDECTIME 2

REM ### Screen minutes Dim ac=5 dc=2 Off ac=30 dc=5

powercfg /setACvalueindex scheme_current SUB_VIDEO VIDEODIM 300

powercfg /setDCvalueindex scheme_current SUB_VIDEO VIDEODIM 120

powercfg /setACvalueindex scheme_current SUB_VIDEO VIDEOIDLE 1800

REM ### Intel UHD 630 sleep problem, now 2h on AC

powercfg /DeviceQuery all_devices | Find /i "UHD Graphics 630" && powercfg /setACvalueindex scheme_current SUB_VIDEO VIDEOIDLE 7200

powercfg /setDCvalueindex scheme_current SUB_VIDEO VIDEOIDLE 300

REM ### Auto Lock the screen after... disable

powercfg /setACvalueindex scheme_current SUB_VIDEO VIDEOCONLOCK 0

powercfg /setDCvalueindex scheme_current SUB_VIDEO VIDEOCONLOCK 0

REM ### reset perf slider for battery in systray (ver 1803) slider in the middle

powercfg /OverlaySetActive OVERLAY_SCHEME_NONE

Echo ### Activate new settings!!!

powercfg /setactive scheme_current

REM ### Make sure Receive Side Scaling on CPU (Offload) is only handled by CPU0

Reg add HKLM\SYSTEM\CurrentControlSet\services\NDIS\Parameters /f /t reg_dword /v RssBaseCpu /d 0x0

Reg add HKLM\SYSTEM\CurrentControlSet\services\NDIS\Parameters /f /t reg_dword /v MaxNumRssCpus /d 0x1

You might want to try bcdedit /set disabledynamictick yes, and then reboot.

This might help some PC's with faster gaming. To disable it use no or type bcdedit /deletevalue disabledynamictick 

EDIT 12 apr 2021:   use bcdedit.exe /set disabledynamictick yes (think it makes no difference in 20H4/H2) and setting below:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel]

"CacheAwareScheduling"=dword:00000005 ; (7) testing (0,1,2,4), 3 also ok, MS internal use only?

"MaxDynamicTickDuration"=dword:000003e8  ; 1000 uS

"MaximumSharedReadyQueueSize"=dword:00000080 ;(w12r2 shows 1) 256=BSOD

"SerializeTimerExpiration"=dword:00000001 ;w12r2 borrow  0=auto 1=force 2=off

Away Mode

There is a special Windows OS power state that is called Away Mode. It is introduced for use of Windows as a Media Center.

You can set Away Mode in the Advanced Power Options "Sleep\Allow Away Mode Policy" (when made visible).

More info on what is does here.

Away Mode can be enabled or disabled by registry too:

Reg.exe add HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power /v AwayModeEnabled /t REG_DWORD /d 0x1 /f

Windows 2012R2 PowerSettings changes to current profile (prefer Balanced, ONLY for VM's, host on High Performance!!!)

REM ### Reset Balanced Scheme And Select it

powercfg /restoreindividualdefaultscheme scheme_balanced && powercfg /setactive scheme_balanced

REM PowerCfg /aliases gives all settings possible, else PowerCfg /q

REM ### Most Hyper-V VM's have Balanced power settings (SQL may be "High Performance")

REM ### Make the CPU freq more responsive to load in current scheme

REM PowerCfg /aliases gives all settings possible, else PowerCfg /q

REM ### Windows 2012r2 def power scheme is Balanced (May be "High Performance")

REM ### Don't sleep CPU with open file connections. They will be disconnected!!!

powercfg /setACvalueindex scheme_current SUB_SLEEP REMOTEFILESLEEP 0

REM ### Don't allow CPU standby mode at all!!! Above setting is not applicable then!

powercfg /setACvalueindex scheme_current SUB_SLEEP ALLOWSTANDBY 0

REM ### Don't Hibernate

powercfg /setACvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 0

REM ### Don't allow Sleep

powercfg /setACvalueindex scheme_current SUB_SLEEP STANDBYIDLE 0

REM ### Don't allow Hybrid Sleep

powercfg /setACvalueindex scheme_current SUB_SLEEP HYBRIDSLEEP 0

REM ### When to increase CPU freq

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFINCTHRESHOLD 85

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFDECTHRESHOLD 65

REM ### Make the CPU freq more responsive to load in current scheme

REM ### Ideal/Single/Rocket/IdealAggressive = 0/1/2/3

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFINCPOL 3

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFDECPOL 1

REM ### Increase CPU freq 100% above maximum if needed

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFBOOSTPOL 100

REM ### Increase CPU Freq based on measured latency

powercfg /setACvalueindex scheme_current SUB_PROCESSOR LATENCYHINTPERF 50

REM ### CPU Perf Boost mode: 0..4 Disabled/Enabled/Aggressive/Efficient Enabled/Efficient Aggressive

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PERFBOOSTMODE 4

REM ### Number of CPU Cores minimum 50% on AC

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES 50

REM powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES 25

REM ### Allow CPU to Throttle/PARK

powercfg /setACvalueindex scheme_current SUB_PROCESSOR IDLEDISABLE 0

REM ### Allow CPU throttle states AC 1=on

powercfg /setACvalueindex scheme_current SUB_PROCESSOR THROTTLING 1

REM ### When park CPU what is lowest state (0..2) No Pref/Deepest/Lightest

powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPPERF 2

REM ### Minimum/Maximum CPU state when not parked

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMIN 20

powercfg /setACvalueindex scheme_current SUB_PROCESSOR PROCTHROTTLEMAX 100

REM ### System Cooling policy 0=passive 1=active

powercfg /setACvalueindex scheme_current SUB_PROCESSOR SYSCOOLPOL 1

REM ### Activate new settings!!!

powercfg /setactive scheme_current

REM Which CPU's may process RSS

Reg add HKLM\SYSTEM\CurrentControlSet\services\NDIS\Parameters /f /t reg_dword /v RssBaseCpu /d 0x0

Reg add HKLM\SYSTEM\CurrentControlSet\services\NDIS\Parameters /f /t reg_dword /v MaxNumRssCpus /d 0x4

Powersave your servers at night?

Something you can do/try is to use the task scheduler and switch the power scheme at 18:00 to Balanced or Powersave on your servers.

Then at 06:00 you switch them to Balanced or High Performance again. Just a thought to save some on your electricity bills ;)

18:00 powercfg /setactive scheme_balanced  (or scheme_max)

06:00 powercfg /setactive scheme_min  (or scheme_balanced)

or switch off cores at night:

18:00 powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES 10 && powercfg /setactive scheme_current

06:00 powercfg /setACvalueindex scheme_current SUB_PROCESSOR CPMINCORES 100 && powercfg /setactive scheme_current

Show My Computer on Desktop

Reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /f /t  reg_dword /v {20D04FE0-3AEA-1069-A2D8-08002B30309D}  /d 0x0

Windows 10 Compact OS

You can save a few GB if you compress Windows 10 binaries.

Use the Compact.exe /CompactOs:query command if would be beneficial. Use Compact.exe /CompactOs:always to force CompactOS.

The files that are compacted are mostly in C:\Windows\WinSxS. Typical compression is 1.9 : 1

Keep in mind that compacting files will increase the CPU load a little if these files are loaded into RAM.

Windows 10 Cleanup 3rd party drivers

Windows 10 stores 3rd party (OEM) drivers in the Driverstore: C:\Windows\System32\DriverStore)

To get a list of these drivers type this command from elevated DOS box:  dism.exe /online /get-drivers  /format:table

-------------- | --------------------- | ----- | --------------------- | ------------------------------- | ---------- | ----------------

Published Name | Original File Name    | Inbox | Class Name            | Provider Name                   | Date       | Version

-------------- | --------------------- | ----- | --------------------- | ------------------------------- | ---------- | ----------------

oem0.inf       | ntprint.inf           | No    | Printer               | Microsoft                       | 21-6-2006  | 6.3.9600.17415

oem1.inf       | prnms001.inf          | No    | Printer               | Microsoft                       | 21-6-2006  | 6.1.7601.17514

oem10.inf      | android_winusb.inf    | No    | AndroidUsbDeviceClass | MediaTek                        | 28-8-2016  | 11.0.0.0

oem11.inf      | hdxhpbpc.inf          | No    | MEDIA                 | Realtek Semiconductor Corp.     | 30-6-2015  | 6.0.1.7548

oem12.inf      | rt64win7.inf          | No    | Net                   | Realtek                         | 15-1-2015  | 7.92.115.2015

Then delete unused drivers from the DriverStore: pnputil.exe /d oemNN.inf      (NN being the number shown in the first column)

Drivers that are still used will not be removed. To removed non-present devices from your computer you can use DeviceCleanup first.

An automated command file could look like this:

DeviceCleanupCmd.exe * -s -n

For /f %P in ('dism /online /get-drivers /format:table^|Findstr oem') do pnputil.exe /d %P /u /f


Note: Use only lines in output with oem

Note: /u /f forces ALL installed oem drivers to be removed. Else use it without /u /f

To list all disconnected devices you can use the pnputil.exe too. For example:

pnputil.exe /enum-devices /disconnected

pnputil.exe /enum-devices /disconnected /class Display

pnputil.exe /enum-devices /disconnected /class VolumeSnapshot

pnputil.exe /enum-devices /disconnected /class System

...

Example: For /f "tokens=2* delims=:" %%P in ('pnputil.exe /enum-devices /disconnected^|Findstr oem') do pnputil.exe /d %%P

Still trying to find a way to uninstall these ghost/disconnected devices from the command line.

Like: wmic.exe path Win32_PnPSignedDriver where DeviceID='STORAGE\\VOLUMESNAPSHOT\\HARDDISKVOLUMESNAPSHOT1'  DELETE /nointeractive

EDIT 31 jan 2020: found the magic bullet for old drivers Cleanup: Rundll32.exe c:\windows\system32\pnpclean.dll,RunDLL_PnpClean /DEVICES /DRIVERS /FILES [/MAXCLEAN]

For pnpclean output see c:\windows\inf\setupapi.dev.log 

(Windows 2012R2 doesn't have the "/FILES" option)

PNPCLEAN [/DEVICES] [/DRIVERS] [/FILES] [/MAXCLEAN] [/NOREMOVE]   /? /help /h                                                                                                             

         /DEVICES            Removes devices missing for the default time period                                                                                               

         /DRIVERS            Removes redundant drivers from the system                                                                                                         

         /FILES              Removes files/directories that are no longer needed that are related to devices and drivers.                                                      

         /MAXCLEAN           Performs maximum cleanup                                                                                                                          

                             For /DEVICES this will set the time period to 0 so that                                                                                           

                             every missing device will be processed for removal.     (Note: Default missing device timeout period is 30 days!!!)

                             For /DRIVERS this will allow every driver that is not                                                                                             

                             installed on some device to be processed for removal.                                                                                             

                             For /FILES this currently has no effect on what is removed.                                                                                       

         /NOREMOVE           Evaluate items only, do not remove                                                                                                                

Show All Windows tasks in one folder ( GOD mode )

Create a new folder anywhere with the name: .{ED7BA470-8E54-465E-825C-99712043E01C}

Windows 10 text scaling (Win8DpiScaling)

If you have high resolution display you probably have set the Display scaling to 125%. But it doesn't look very good in older programs!!! Fuzzy.

HKEY_CURRENT_USER\Control Panel\Desktop

Win8DpiScaling dword 0x1

LogPixels dword 0x78 (is 120 dpi i.e.  125%)

DPI               Scale Factor (%)

96  (0x60)    100%

120 (0x78)   125%

144 (0x90)   150%

192 (0xC8)   200%

Or goto Display Settings and Advanced Scale Settings.

Need to Log Off and On again for effect.

Internet Explorer 9+ Speedup

To get more speed while browsing you you first of all need to install a adblocker as on my site described here. Furthermore IE has some nice hidden features that can speed up browsing dramatically. One of them is DNS prefetching like Chrome. I think this is still experimental but I have no problems with it:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN

DNSPreresolution dword 0x8

Use_Async_DNS string yes

What also helps is to enable the DNS cache:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

DnsCacheEnabled dword 0x1

DnsCacheEntries dword 0x200          (512 domains)

DnsCacheTimeout dword 0x15180    (one day)

And disable prebinding of IE addons:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

EnablePreBinding dword 0x0

Force GPU to handle all IE 9 rendering:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_GPU_RENDERING]

"*"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_GPU_CACHE]

"*"=dword:00000001

And these policies may be handy:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Ext

DisableAddonLoadTimePerformanceNotifications dword 1

NoFirsttimeprompt dword 1

Disable Flash loading by default:

It will ask for allowance. Remove this key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{D27CDB6E-AE6D-11CF-96B8-444553540000}\iexplore\AllowedDomains\*

But then you need to set the NoFirsttimeprompt dword to 0. Else it won't ask you for allowance and load anyway.

If you want to remove this pluging from the "Run without permissions" addon list remove this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\PreApproved\{D27CDB6E-AE6D-11cf-96B8-444553540000}

Download reg file here.

Windows Explorer - Total folder size in Quick Tip Balloon

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

"FolderContentsInfoTip"=dword:00000001

(or HKCU)

[HKEY_CLASSES_ROOT\Directory]

"InfoTip"="prop:System.Comment;System.DateCreated;System.TotalFileSize"

Total Directory size column in Explorer (WIP)

Windows Explorer - Change current open folder icon to Blue Pin

In Windows folder trees (Explorer, Registry) it is hard to see what folder you are in. Icons for closed and open folders are the same.

Since Windows 95 it is possible to change the Shell Icons. Open the registry and add this key and value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]

"4"="%SystemRoot%\\system32\\imageres.dll,-5100"

4 is the icon for open folders

Log out and log in again to see the effect. (Or click start menu, then CTRL+SHIFT+Right click on clean area and "Exit Explorer". Press CTRL+SHIFT+ESC and in File > New Task and type explorer)

Windows Explorer - files in use solution (win7)

This setting is undocumented and use with care. Many found that files cannot be deleted in windows because they "are in use". No one knows what is causing thes e files to be in use and by what process. After some recompiling I found thet in comdlg32.dll, ExplorerFrame.dll and shell32.dll there was a setting called MaxWorkerThreadsPerScheduler which sounded interesting. 

After applying it in HKLM for 6 months now I never had the "file in use" problem anymore. Note that it is queried in HKCU first. The default value is 5.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellTaskScheduler]

"MaxWorkerThreadsPerScheduler"=dword:000000ff

Boot tracing and ReadyBoot logging

Windows 7 and up logs and traces every boot. This causes a lot of writes to the log files on the harddisk. With SSD you don't want that.

To disable boot tracing  you can disable it here:

Note: Take permissions first of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Diagnostics\Performance

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Diagnostics\Performance]

"DisableDiagnosticTracing"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Diagnostics\Performance\BootCKCLSettings]

"Start"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Diagnostics\Performance\ShutdownCKCLSettings]

"Start"=dword:00000000

You can also disable all Performance Logging (not advised):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib]

"Disable Performance Counters"=dword:00000001

To disable ReadyBoot logging you can use the Control Panel > Administrative Tools > Performance Monitor > Data Collector Sets > Startup Events Trace Settings and disable ReadyBoot and SQMLogger for example.

Limit or Share CPU on multi user servers

On Windows 2008+ terminal servers or Windows Vista+ workstations you can limit the CPU percentage for each user that works on that system.

There are two ways. Equal sharing with Microsoft Dynamic Fair Share Scheduling (DFSS) or hard limit a user with a percentage.

In the registry you can set DFSS here: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Quota System

with dword EnableCpuQuota 0 or 1

To limit a certain user to a certain percentage of the available CPU power you can do the following in the registry.

Create a new key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Quota System\S-1-5-21-381264..  (get the proper UID with wmic.exe PATH win32_userprofile)

Then create a new dword called CpuRateLimit and set it with the percentage you want from 1 to 100 (1-0x64).

Print server tweaks

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print]

; 0x20 normal  0x40 idle  0x80 high

"SpoolerPriority"=dword:00000040

; Fix Offline status printers due to snmp

"SNMPLegacy"=dword:00000001

Defrag your HDD/SSD

Old school hard drives are spinning plates with moving read heads. After using the hard disk a while holes in the stored data appear due to removing files.

The data on the disk needs to be realigned to get best performance. Frequently used files need to be on the center tracks of the plates. This process is called

Defragmenting/Defragging your hard disk. Windows takes care of this using the Task Scheduler.

These registry options make Defrag a little better:

REG.EXE ADD "HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction" /f /v "Enable" /t REG_SZ /d "Y"

REG.EXE ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout" /f /v "EnableAutoLayout" /t REG_DWORD /d 1

SSD disks don't need defragmenting since there is no read head or moving parts. But SSD memory cells have limited rewrite cycles. This is why memory cells that have deleted files will only be marked for deletion. Windows will not rewrite these until it runs out of space. To reuse these "marked for deletion" cells you must TRIM the SSD disk. Trimming makes these cells usable again per direct. Don't use TRIM every day!!!!

To enable TRIM in Windows Defrag use:

fsutil behavior set DisableDeleteNotify 0

If you use Defrag now on your SSD it will not defrag it but trim it.

Another way to trim your SSD is using the Sysinternals tool SDelete.exe:  SDelete.exe -z C:

Tweaking MultiMedia Class Scheduler Service (MMCSS)

This service will start/stop itself IF audio/video is used (or when starting Games).  It will reserve some CPU (default 20%) for other background tasks. You can reduce this to 10% to gain 10% more CPU for your gaming. Values lower than 10 will default to 10% (see c:\windows\system32\mmcss.dll)

The service will auto shutdown after IdleDetectionCycles if AlwaysOn is 0

Registry Entries:

REM ### Reserve 10% cpu for other procs with multimedia class scheduler running (def 20%) MMCSS will auto shutdown if no audio is used

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile]

"IdleDetectionCycles"=dword:1 ; like 5 minutes

"AlwaysOn"=dword:0

"NoLazyMode"=dword:1

"SystemResponsiveness"=dword:a

"NetworkThrottlingIndex"=dword:ffffffff

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games]

"Affinity"=dword:00000000

"Background Only"="False"

"BackgroundPriority"=dword:00000008

"Clock Rate"=dword:00002710

"GPU Priority"=dword:00000014

"GPU Priority.ORG"=dword:00000008

"GPU Priority.VALUES"="0-31"

"Priority"=dword:00000008

"SFIO Priority"="High"

"SFIO Priority.ORG"="Normal"

"SFIO Priority.VALUES"="Idle Low Normal High"

"Scheduling Category"="High"  ; -> Priority will be always 2 if this is High

"Scheduling Category.ORG"="Medium"

"Scheduling Category.VALUES"="Low Medium High"

A little more info from Microsoft here.

Tweaking Process Options

Tweaking the default PerfOptions of a process may work around bottlenecks. I know that for instance VSS Shadow Copies might get deleted at boot time, loosing all your restore points, if other intensive HDD I/O operations take place during boot. To make sure VSS gets all the IO you can try this trick:

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\VSSVC.exe\PerfOptions]

"CpuPriorityClass"=dword:00000003

"IoPriority"=dword:00000003

"PagePriority"=dword:00000005

The parameters for this Process tweaking are:

RAMMap can empty all caches manual:

- Empty Working Sets

- Empty System Working Sets

- Empty Modified Page List

- Empty Standby List

- Empty Prio 0 Standby List

But you can have more (automatic) control with with the Microsoft Utility DynCache (Windows 7). It is a utility from Microsoft that runs as a service and configured in the registry.

; For 32 bit Windows 7 (2GB)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters]

"BackOffMBytesOnLowMemory"=dword:00000032 ;50 MB

;"MaxSystemCacheMBytes"=dword:00000000 ;(90%)

"MaxSystemCacheMBytes"=dword:000000fa ;250 MB

"MinSystemCacheMBytes"=dword:00000032 ;50 MB

"SampleIntervalSecs"=dword:0000001e ;30 sec

"CacheUpdateThresholdMBytes"=dword:00000032 ;50 MB

; For 64 bit Windows 7 (>4GB)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters]

"BackOffMBytesOnLowMemory"=dword:000000c8 ;200 MB

"MaxSystemCacheMBytes"=dword:000001f4 ;500 MB

"MinSystemCacheMBytes"=dword:00000064 ;100 MB

"SampleIntervalSecs"=dword:0000001e ;30 sec

;"CacheUpdateThresholdMBytes"=dword:00000064

"CacheUpdateThresholdMBytes"=dword:00000032 ;50 MB

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters\Notepad]

"AdditionalBackoffMBytes"=dword:0000000a ;10MB

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters\sqlservr]

"AdditionalBackOffCounter"="\\SQLServer:Memory Manager\\Total Server Memory (KB)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters\System]

"AdditionalBackoffMBytes"=dword:000000fa ;250MB

Windows CPU Core Parking

Since Windows Vista and newer (Windows 7, 2008, Windows 8 and 2012) Microsoft introduced a new power control method. One option that is not very well configured out of the box is CPU Core Parking. This means that CPU Cores are switched on and off by how much CPU you demand. (governor in Unix)

You may have noticed that even if you have 4 cores, running demanding programs use only half or even one of the CPU Cores available on your system.

There is a tool that can set the number of cores you can use on AC or Battery. It is called ParkControl.

But you can do it without the tool too and add a little more finesse to it for finetuning the CPU Core Parking. You can use PowerCfg.exe from windows itself for finetuning. More info on PowerCfg.exe here.

Check your current Power Scheme settings with: powercfg /q> c:\temp\powerscheme.txt

Or for example only for sub_processor part: powercfg /q scheme_current sub_processor

Get all the aliases with powercfg /aliases

The default Power Schemes:

The Core Parking options in a Power Scheme are (in WIn7 only SUB_PROCESSOR PROCTHROTTLEMIN/PROCTHROTTLEMAX as alias):

Core Parking tweaks can be set using this command (here for ac only):

powercfg -setacvalueindex scheme_current sub_processor 2ddd5a84-5a71-437e-912a-db0b8c788732 10

powercfg -setacvalueindex scheme_current sub_processor 447235c7-6a8d-4cc0-8e24-9eaf70b96e2b 2

powercfg -setacvalueindex scheme_current sub_processor 8809c2d8-b155-42d4-bcda-0d345651b1db 500

powercfg -setacvalueindex scheme_current sub_processor e70867f1-fa2f-4f4e-aea1-4d8a0ba23b20 500

To disable any CPU Core Parking (so all CPU cores always on):

powercfg -setacvalueindex scheme_current sub_processor 0cc5b647-c1df-4637-891a-dec35c318583 100

To enable CPU Throttle:

powercfg -setacvalueindex scheme_current sub_processor 3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb 1

For battery you can also set it using: powercfg -setdcvalueindex scheme_current sub_processor .....

(From Windows all subsettings have aliases too)

To activate the settings use: powercfg -setactive scheme_current         (or scheme_max/scheme_min/scheme_balanced)

In the registry settings are stored here: HKLM\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c\54533251-82be-4824-96c1-47b60b740d00 where 54533251-82be-4824-96c1-47b60b740d00 is the "Processor Power management settings and configurations".

Note: a MS patch might set this registry entry hklm\system\currentcontrolset\power\CoreParkingDisabled to 1 (set it to 0)

Generate a Power Report

You can create a useful energy settings logfile in html. You can do that with the powercfg.exe -energy output: command.

Use -xml for Xml output. Default the logfile is stored in the currect directory at energy-report.html 

Generate a Battery Report

PowerCfg.exe /BatteryReport & battery-report.html

battery-report.html is the default name and is created in the currect folder.

Add more options to the Power Options Advanced Settings

As we have seen with the CPU Core Parking there are many more options to configure using PowerCfg than via the Advanced Settings 

It is very easy to add all of them to the Dialog. You can switch them on via the registry Attributes value per setting.in the Power Options Dialog.

Open the registry and go for example to the "Processor Power management settings and configurations":

HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00

For each setting you want to show in the Advanced Setting Dialog of Power Options you open each subkey and change the value Attributes from 1 to 0.

If Attributes value is not present the option will show by default.

PowerSettingsExplorer shows/hides settings too.

* only for memory io

Process Hacker (free) is a good tool to view the settings in real time. More about priorities from Microsoft here.

UseLargePages

You might improve the performance of programs (games) that use a lot of RAM by enabling Large Pages. Default a page block is 4KB.

A Large Page block is 2MB. It reduces a little overhead in the RAM management routines (uses less RAM) and reduces PageFaults by a lot.

If you go to Task Manager processes and sort on the Private RAM column (or better add Pagefaults column) these top processes are candidates for UseLargePages.

I use this on workstations for example for searchui.exe, explorer.exe, tiWorker.exe, chrome.exe and dllhost.exe(maybe?)

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe]

"UseLargePages"=dword:00000001

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\dllhost.exe]

"UseLargePages"=dword:00000001

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\chrome.exe]

"UseLargePages"=dword:00000001

For servers you can add svchost.exe to the list. For SQL server you can add sqlservr.exe and for Exchange that is Microsoft.Exchange.Store.Worker.exe, SMEX_Master.exe and noderunner.exe

On a server you can also use it for mmc.exe, servermanager.exe and w3wp.exe

Blocking programs from starting

There is an option to debug programs you start in windows. You can use this to block any program from starting.

The text value is called debugger. Just give it the value of another windows exe file that does nothing like: consent.exe

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\PROGRAM1.exe]

"Debugger"="msg.exe * \"Image File Execution Options (Debugger)! \""

Windows 10 "bug" in Explorer with single click select

When using "Single Click" select option in Explorer the item under your mouse cursor gets selected at "MouseHoverTime" (def 500 ms). This doesn't happen when you have "Double Click" select.

You can set HKCU\Control Panel\Mouse\MouseHoverTime to 60000 but that will hinder the "drag&drop" auto open hover function on Folders and Icons.

Service Start values in the registry

Sometimes you need to disable or enable a service that is not listed in the Services dialogs. You can do that in the registry.

Search for that service under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services and change the start value to:

    Boot            0x0

    System        0x1

    Automatic   0X2

    Manual        0x3

    Disabled     0x4

Tweaking the Services

Big memory eaters are Desktop Window Manager (Aero etc) and Superfetch. If you are on 32 bits you probably don't want them. Set to disabled via the Services.msc or the sc.exe command.

You can disable even many more. Below you find the list of running and disabled services on my PC. I use WLAN and no Firewall or Internet Connection Sharing. I use an Asus laptop, so some services are related to OSD and special keys for Asus.

Removing Google Update

Google Update can be in the C:\Users\<user>\AppData\Local\Google\Update and/or the C:\Program Files\Google\Update folder.

First remove the Google Update Services if present. You can do this by running (elevated):

"C:\Program Files\Google\Update\GoogleUpdate.exe" /unregsvc

"C:\Program Files\Google\Update\GoogleUpdate.exe" /unregserver

Remove Google Update tasks from the Windows Task Scheduler.

Remove Google Update startup registry values from HKCU\Software\Microsoft\Windows\CurrentVersion\Run

and/or HKLM\Software\Microsoft\Windows\CurrentVersion\Run

Remove Google Update registry keys: HKCU\SOFTWARE\Google\Update and/or HKLM\SOFTWARE\Google\Update

Maybe this command work (it should): "C:\Program Files\Google\Update\GoogleUpdate.exe" /uninstall

else just remove the two folders: C:\Users\<user>\AppData\Local\Google\Update and/or C:\Program Files\Google\Update

Reboot

Policies that prevent Google Update from doing anything:   (outdated)

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update]

"AutoUpdateCheckPeriodMinutes"=dword:00000000    ;don't check for updates

"InstallDefault"=dword:00000000                                 ;don't install anything

"UpdateDefault"=dword:00000000                                ;don't update anything

"Install{F69EABDD-A4BB-4555-BE7E-1EA5F59BBA24}"=dword:00000000   ; specific product, see HKLM\SOFTWARE\Google\Update\Clients or HKCU

"Update{F69EABDD-A4BB-4555-BE7E-1EA5F59BBA24}"=dword:00000000  ; specific product, see HKLM\SOFTWARE\Google\Update\Clients or HKCU

 

Speed Up your games fps

V-Sync is forced from Windows 7 and upwards. Games have their own routines. You can dramatically improve fps with this registry value (reboot needed)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Scheduler

"EnablePreemption"=dword:00000001 ; WIN8+ def 1

"VsyncIdleTimeout"=dword:00000000 ; def 10

reg.exe add HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Scheduler /v VsyncIdleTimeout /t reg_dword /d 0 /f

Make Windows 10 1909 run from an USB drive (minimal 16GB)

I managed to get Windows 10 1909 running from a 16GB USB stick, including Office 2013.  But 32 GB is more than enough!!! I might want to add a RAM drive later for TEMP files and paging.

Follow these steps to install Windows 10 and slim it down

Make the following Registry changes :          (WIP!!!)

Reg.exe add HKLM\System\CurrentControlSet\Control /f /v PortableOperatingSystem/t REG_DWORD /d 1

Reg.exe add HKLM\System\CurrentControlSet\Control\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 30000

Reg.exe add HKLM\System\CurrentControlSet\Control /f /v BootDriverFlags /t REG_DWORD /d 6

Reg.exe add HKLM\System\CurrentControlSet\Control /f /v BootDriverFlags.USB /t REG_DWORD /d 6

Reg.exe add HKLM\System\CurrentControlSet\Control /f /v BootDriverFlags.SATA /t REG_DWORD /d 0x1c

Reg.exe add HKLM\System\HardwareConfig /f /v BootDriverFlags /t REG_DWORD /d 0

Reg.exe add HKLM\System\HardwareConfig /f /v BootDriverFlags.USB    /t REG_DWORD /d 0

Reg.exe add HKLM\System\HardwareConfig /f /v BootDriverFlags.SATA /t REG_DWORD /d 0x14

Reg.exe add HKLM\Software\Microsoft\Windows\CurrentVersion\ReserveManager /f /v ShippedWithReserves/t REG_DWORD /d 0

Create a bootable USB device

The HDD disk will have at least 2 partitions: one Reserved (500MB) and the rest as WINDOWS (about 14GB with Office)

We need to boot from a Windows PE stick and clone the HDD disk to the USB device/stick. Several solutions are available. I use Gandalf WIN10 PE.

Well that is it.

https://blogs.msdn.microsoft.com/knom/2009/04/07/windows-7-vhd-boot-setup-guideline/


Tame that Office ClickToRun


When you install Office ClickToRun is installed. This process can be a pain. Creating too much files to frequent. You can stop it like this.


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClickToRun\OverRide]

"DisableLogManagement"=dword:00000001 ; Finally no log files at all in c:\windows\temp


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration]

"TimerInterval"="900000" ; def 60000 (1 minute)

Below mainly Windows 7 files if not WIN10 in the name: