Jump to content

Registry search and edit/make new values, Nagle's algorithm fix


uber125
 Share

Recommended Posts

Hello all!

I just wanted to share this scrip with you all. I play a Game called World of Warcraft, and this thread inspired to make a script so I can apply this registry tweak to multiple machines quickly.

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.

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
Edited by uber125
Link to comment
Share on other sites

Would this be helpful in speeding up a dialup conection. I am guessing not, but I just thought that I would ask.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

Aww, I was really hoping that this could help. I am running Vista so i cannot use it. But it really is a nice peace of code.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

Thanks for Sharing,

I hope now i can now play CS 1.6 without "Too High Ping ,try Again Later"

but i don' see any changes at time :

Reply from 72.14.207.99: bytes=32 time=1565ms TTL=242
Reply from 72.14.207.99: bytes=32 time=1805ms TTL=242
Reply from 72.14.207.99: bytes=32 time=1731ms TTL=242
Reply from 72.14.207.99: bytes=32 time=1821ms TTL=242

@up : u mean piece not peace , right ?

Edited by Ahmad

[center]I want to change the world ...., but I don't have the source code xD[/center]

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...