• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

SOLVED Creating a .reg file for all my tweaks

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Solder

Member
Joined
Apr 14, 2012
Location
GA, USA
I'm in the process of writing a .reg file to expedite all my registry tweaks so I don't have to add/change them all one by one on a new install. I'm hoping someone could verify the format for me
so I can be sure I'm writing it correctly. Thanks in advance :)

Here's what I've written so far...
Code:
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
    "NtfsEncryptPagingFile"="REG_DWORD:1"
    "NtfsMemoryUsage"="REG_DWORD:2"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
    "HeapDeCommitFreeBlockThreshold"="REG_DWORD:40000"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Update]
    "UpdateMode"="REG_DWORD:1"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
    "DisablePagingExecutive"="REG_DWORD:1"
    "SecondLevelDataCache"="REG_DWORD:400"
    "ThirdLevelDataCache"="REG_DWORD:2000"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters]
    "EnableSuperfetch"="REG_DWORD:0"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]
    "FastCopyReceiveThreshold"="REG_DWORD:5dc"
    "FastSendDatagramThreshold"="REG_DWORD:5dc"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
    "IRPStackSize"="20"
    "Size"="REG_DWORD:2"
    "SizReqBuf"="REG_DWORD:4000"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
    "DefaultTTL"="REG_DWORD:80"
Are all the values supposed to be added in hex format? If so, is it necessary to enter the value as 000003de or can it be entered as just 3de without all the extra 0's?

Also, some of the keys further down the chain have spaces in the name. Do I have to use an underscore between the words or can it be written the way I have it now?

EDIT: One more question,

RE: String values, is this the correct format "Cache"="REG_SZ:E:\IE Cache" or should there be quotes around the value like this "Cache"="REG_SZ:"E:\IE Cache"" ?


EDIT: Alright, cool beans, I've found most of the syntax online but I'm still on the hunt for an Expandable String Value syntax.

EDIT: I think I found it, please let me know if it's correct.

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\wmplayer.exe]
    @="%ProgramFiles%\\Windows Media Player\\wmplayer.exe"
    "Path"="%ProgramFiles%\\Windows Media Player"
It's the double back slashes that define an Expandable String Value from a String Value, correct?
 
Last edited:
Well, That's not the correct format for an Expandable String Value. I still can't find it after hours of searching and testing on my own. The rest of the file is complete and works flawlessly except for the Two Expandable Strings.
If someone can help, please let me know. :) Thanks
 
not sure what the syntax is in reg files but any chance of adding comments what the parts actually do? Some of them are self explanatory but other I'm not sure what is going on.
edit: perhaps a missing end bracket on the session manager line?
 
I've already figured out that part of the file and yes I was missing a bracket.

To comment out a line in a .reg file a colon " ; " is used.
For example...

; This is a registry file.
For me to comment out the entire file would take too long and make the file unnecessarily large.
I'll edit in a bit and add some explanation to what's there.
As for the syntax of DWORD's and String Values, I've got them covered. The only part that I'm having trouble with is the Expandable String. It's still a mystery at the moment.

EDIT: ok here's the commented section of what's listed above. The actual file is way longer but this is a snipit of the file.

Code:
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
;used to encrpyt the paging file for security reasons.
    "NtfsEncryptPagingFile"=DWORD:00000001
;is used to increase the cache size of the file system.
    "NtfsMemoryUsage"=DWORD:00000002

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
;This value specifies the number of freed bytes above which the heap manager
;decommits the memory (instead of retaining and reusing the memory). If you
;set this registry key to a high value (for example, 262144), the heap manager
;is more effective when making sure that no bytes are decommitted. Therefore,
;virtual address fragmentation is lessened or even avoided.
    "HeapDeCommitFreeBlockThreshold"=DWORD:00040000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Update]
;Normally when the contents of a window change you may need to wait a few
;seconds, or press F5, to refresh the display to see the updated information.
;This tweak configures the system to perform faster automatic updates.
    "UpdateMode"=DWORD:00000001

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
;Prevents the system from paging out the kernel and leaves it in RAM which is 
;way faster than a drive.
    "DisablePagingExecutive"=DWORD:00000001
;Windows by default has this set to 0 which is off. To enable the L2 Cache
;set this value to the size of your L2 Cache in KB.
    "SecondLevelDataCache"=DWORD:00000400
;This isn't even listed in the registry.  I found this while researching the 
;L2 issue.  I added it myself although I have no real way of testing it but 
;between the L2 and L3 additions, I saw an improvement in the system performance.
;Same goes for the size, set it to the L3 Cache in KB
    "ThirdLevelDataCache"=DWORD:00002000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters]
;This is set up for SSD's but you have a choice of what to set them to.
;1=cache programs only, 2=cache boot files only, 3=cache everything.
;For ecample, my laptop has these set to 1,2 respectively.
    "EnablePrefetcher"=DWORD:00000001
    "EnableSuperfetch"=DWORD:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]
;These should be tesed on your network to see if they make a speed difference.  
;some say to set it each to 00000800 and some say 00000400 and still others have
;suggested the 5dc which is 1500 in decimal.
    "FastCopyReceiveThreshold"=DWORD:00000400
    "FastSendDatagramThreshold"=DWORD:00000400

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
;the IRPStackSize is a parameter that specifies the number of stack locations in I/O request
;packets (IRPs) that are used by the operating system. Each stack uses 36 bytes of memory 
;for each receive buffer and you can increase the IRPStackSize, through the Windows registry
;for some transports, media access control (MAC) drivers, or for file system drivers.
    "IRPStackSize"=DWORD:00000020
;I can't remember what Size is but it's part of the networking changes I came across
;some years ago.  It's just stayed with me since.
    "Size"=DWORD:00000002
;In higher latency Network environments, delays may be encountered with the default request
;buffer size (4356 decimal). The range of this parameter is 1024 - 65535 bytes. Testing has
;shown that, in most standard Ethernet environments, 16384 (decimal) is a better choice, if
;memory is available. I have set this to 00001400 because it gives me a speedy network.
    "SizReqBuf"=DWORD:00001400

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
;Sets the Default Time To LIve for network packets
    "DefaultTTL"=DWORD:00000080
 
Last edited:
Great news! I figured it out. I exported the file I had modified and looked at it that way. Then I copied it into my .reg file for future use. Ha ha! Kinda cool. Look at me go :)
 
Back