Jump to content

trying to edit Hive*.inf files, Help needed


Recommended Posts

well, opening the files told me that HKCR=HIVECLS.INF,

HKCU=HIVEDEF.INF and HKLM=HIVESFT.INF and HIVESYS.INF.

Untill now this is what i've figured out as the format,

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Tour","RunCount",0x00010003,0

HKLM=Hkey Local Machine

between " and " the folder path

"RunCount" value name

0x00010003, meant to signify the type of data i.e dword, sz etc

next value is the data value, also i think the values are in hex,

so

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
GlobalMaxTcpWindowSize="256960"
TcpWindowSize="256960"
Tcp1323Opts="1"
DefaultTTL="64"
EnablePMTUDiscovery="1"
EnablePMTUBHDetect="0"
SackOpts="1"
TcpMaxDupAcks="2"
MTU="1500"

would be

[Addreg]
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","GlobalMaxTcpWindowSize",0x00010003,0x3EBC0
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","TcpWindowSize",0x00010003,0x3EBC0
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Tcp1323Opt",0x00010003,1
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","DefaultTTL",0x00010003,64
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","EnablePMTUDiscovery",0x00010003,1
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","EnablePMTUBHDetect",0x00010003,0
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","SackOpts",0x00010003,1
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","TcpMaxDupAcks",0x00010003,2
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","MTU",0x00010003,0x5DC

is this right, i needed a way to add common registry settings for the entire system one time only, if i'm successfull i'll post the codes.

Link to comment
Share on other sites


Thanks but the link only had info on inf files, hive*.inf files are different .I'm trying to edit the hive files present in windows setup, they are inf files which have pre installation registry and are loaded before the first reboot.

Link to comment
Share on other sites

chezy666, it seems ok, but i do have a question.

Is 0x00010001 Value a REG_DWORD, and +...02 it doesn't overwrite the value, like yours 0x00010003 ?

(i'm not sure in that)

And is it really necessary to convert in hex (e.g. "1500" to 0x5DC) ?

Link to comment
Share on other sites

the only difference between normal INF files and hive INF files, is that the hive ones don't like shorthand typing. YOu have to spell out everything, otherwise EVERYTHING APPLIES. You also can't use STRINGS (%CUSTOMVALUE%).

also, I would suggest 0x00010001 as opposed to 0x00010003. ALso, in either case.....the value if it is a dword, needs to be in hex. COMPLETE hex, not short. 0x000005DC

Link to comment
Share on other sites

Alanoll, ok, thx about the info, just i have something to add.

I'm using this and it works (environment variable used)

HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","label",0x00020000,"%%systemroot%%\inf\file.ext"

Maybe that's because it's in hivedef and applied on first logon.

edit: I overlooked "CUSTOM value", not environment...apologies

(it's those %% that triggered me).

Lets leave the post for him to see how to use environment variable

Link to comment
Share on other sites

%CUSTOMVALUE%, I meant what's defined in the [sTRINGS] section of a normal INF. You CAN'T do that with the hive files, as there is no real interpreter at that point. Everything has to be spelled out like it's stupid.

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

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