Upon these findings, it will then seek String value with in the sub directory of the above. This sub directory, is where your DHCP IP is listed. I.E. {7DBA6DCA-FFE8-4002-A28F-4D2B57AE8383}. This directory name is different on every PC. However, the String value it is seeking is always named DhcpNameServer. After finding DhcpNameServer It will then will write a new Dword in the same directory as DhcpNameServer.

Basically by doing this, it will deactivate the nagle algorithm to improving your ping to a server. Although you may not see any noticeable changes within a small home network, or any lightly used network. In highly interactive environments, such as some client/server "games", you will see a big difference. You can learn more about Nagle's algorithm here.

This isnt the only reason I wanted to share this script. I fell this script function can be built upon for other tasks in the windows registry.

Enjoy!

#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.12.1
Author: Uber125
Script Function:
This script will seek a directory in the Windows registry.
I.E. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
Upon these findings, it will then seek String value with in the sub directory of the above.
This sub directory, is where your DHCP IP is listed. I.E. {7DBA6DCA-FFE8-4002-A28F-4D2B57AE8383}.
This directory name is different on every PC. However, the String value it is seeking is always named DhcpNameServer.
After finding DhcpNameServer It will then will write a new Dword in the same directory as DhcpNameServer.
#ce ----------------------------------------------------------------------------
;Seek String and write new a single Dword in the same directory.
$FindPath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces"
For $i= 1 to 10
$Path = RegEnumKey($FindPath, $i)
If @error <> 0 then ExitLoop
For $Value = 1 to 100
$var = RegEnumVal($FindPath & "\" & $Path, $Value)
If @error <> 0 Then ExitLoop
If ($var = "DhcpNameServer") Then
RegWrite($FindPath & "\" & $Path, "TcpAckFrequency", "REG_DWORD", "00000001")
EndIf
Next
Next
; Write a single REG_DWORD value
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters", "TCPNoDelay", "REG_DWORD", "00000001")
Exit