Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

HIVEFIX.INF

- - - - -

  • Please log in to reply
8 replies to this topic

#1
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
Hi

I have been tweaking the Winxp install (pro upgrade), using HIVEFIX.INF. This is used to create the environment that is used to create the Users directory. When HIVEFIX runs, there are no user directories, and no registry, to speak of. HIVEFIX basically hooks in here.

This version of WinXP is been patched.


; This is the fixhive.inf.  You need to also fix the file txtsetup.sif to
; get this to run.
;
; Add the stuff shown in dosnet.inf and txtsetup.inf to those files.
; The sections exist.  For the first it is alpha, the next is a replace.
; The hiveinfs. are added to the end of the files.
;
; Save the section hivefix.inf as a file, and edit it to suit your
; tastes.
hivefix.inf  =  various adjustments to the OS
tweakui.exe  =  vers 2.1, added to the control panel
directx.cpl  =  extracted from vers 9

-------------------------- dosnet.inf ---------------------------------
[Files]
d1,hivefix.inf
d1,tweakui.exe
d1,directx.cpl

-------------------------- txtsetup.sif -------------------------------
[SourceDisksFiles]
hivefix.inf  = 100,,,,,,_x,,3,3
tweakui.exe  = 1,,,,,,,2,1,0
directx.cpl  = 1,,,,,,,2,1,0

[SetupData]
DefaultPath=\WINNT

[HiveInfs.Fresh]
DelReg = hivefix.inf,AddReg
AddReg = hivefix.inf,AddReg

[HiveInfs.Upgrade]
DelReg = hivefix.inf,AddReg
AddReg = hivefix.inf,AddReg

---------------------------hivesft.inf----------------------------------

+ new file 'hivefix.inf'.

The settings in hivefix.inf are mainly registry settings, in the form

   rootkey, regkey, value, flags, data

		 base form						+ modifiers
   =============================   =================================
   0x00000000  reg_sz  (default)   0x0000 0002  keep original values
   0x00000001  reg_binary		  0x0000 0004  Delete subkey or value
   0x00010000  reg_multi_sz		0x0000 0008  Append data to reg_multi
   0x00010001  reg_dword		   0x0000 0010  create subkey, but ignore data
   0x00020000  reg_expand_sz	   0x0000 0020  modify only if exists.
   0x00020001  reg_none			0x0000 1000  modify x64 registry
								   0x0000 4000  modify x32 registry

page 276 of 'microsoft windiws registry guide'.

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

This tells you what you need to modify in the early bit, ie, in the named files. If you want to change the default install path from \WINDOWS to \WINNT, you can do it here.

You then create a sample hivefix, which has all of the jucies. Some of the things don't work, because later processes change them. But it does provide an interesting thing, and we can set the proggie up to load eg tweakui and directx.cpl in the control panel under "System Maintanence".

These are examples of cpls implemented as .cpl files, and CLSID items.

The rest of the file is modest hacks on the system, but it boots up with the default ParseAutoExec=0x00, and a few other goodies.



This is HIVEFIX.INF. It's heavily customised...

[Version]
Signature = "$Windows NT$"
DriverVer=07/01/2001,5.1.2600.2180

[AddReg]
; homegrown
; flags: see 'windows registry guide', p276
HKCU,"Console","InsertMode",0x00010001,1
HKCU,"Console","QuickEdit", 0x00010001,0
HKLM,"Software\Microsoft\Command Processor","CompletionChar",0x00010001,9
HKLM,"Software\Microsoft\Command Processor","PathCompletionChar",0x00010001,9
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ParseAutoexec",0x00000000,"0"
HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ParseAutoexec",0x00000000,"0"

; Shell fixes
; these are set later on by the system.
HKCR,"CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}","SortOrderIndex",0x00010001,84
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","DontPrettyPath",0x00010001,1
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","Hidden",0x00010001,1
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","HideFileExt",0x00010001,0
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","IntelliMenus",0x00000000,"No"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","ShowSuperHidden",0x00010001,1
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","SuperHidden",0x00010001,1
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoDriveAutoRun",0x00000001,00,06,00,00

; Add TweakUI to Control Panel
; need to add an icon-pointer here.  Windows is not that smart!
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}","",0x00020000,"TweakUI"
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}\DefaultIcon","",0x00020000,"%systemroot%\system32\Tweakui.exe,0"
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}\Shell\Open\command","",,"TweakUI.exe"
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}\ShellFolder","Attributes",0x00010001,48
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}","{305CA226-D286-468e-B848-2B2E8E697B74} 2",0x00010001,5
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{D14ED2E1-C75B-443c-BD7C-FC03B2F08C17}","",,"Add Tweakui to Control Panel"

; Add directx to control panel (Performance and Maintanence)
HKLM,"Software\Microsoft\Windows\CurrentVersion\Control Panel\Extended Properties\{305CA226-D286-468e-B848-2B2E8E697B74} 2",\
	"%Systemroot%\system32\directx.cpl",0x00010001,5


; Zone Zero to IE
; Still buggy
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","CurrentLevel",0x00010001,69632
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","MinLevel",0x00010001,65536
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","RecommendedLevel",0x00010001,66816
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","Flags",0x00010001,71
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","Description",,"Sites on your Computer"
HKCU, "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0","DisplayName",,"My Computer"


; Random replacements for the shell.
; hivesys.inf
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Language","InstallLanguage",,"%INSTALL_LANGUAGE%"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","(Default)",,%INSTALL_LOCALE%

; hivecls.inf
HKCR,"CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}","",0x00000000,"%NETWORK_NEIGHBORHOOD%"
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}","",0x00000002,"%MY_COMPUTER%"

; hivesft.inf
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020002,"%DEFAULT_PROFILES_DIR%"

HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE",,,"%DESC_IE%"
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE","LocalizedString",0x00020000,"@%programfiles%\%LMSIE4%\iexplore.exe,-702"
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE\DefaultIcon",,0x00020000,"%programfiles%\%LMSIE4%\iexplore.exe,0"
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE\shell\open\command",,0x00020000,"""%programfiles%\%LMSIE4%\iexplore.exe"""
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE\InstallInfo","ReinstallCommand",0x00020000,"%systemroot%\system32\shmgrate.exe OCInstallReinstallIE"
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE\InstallInfo","HideIconsCommand",0x00020000,"%systemroot%\system32\shmgrate.exe OCInstallHideIE"
HKLM,"Software\Clients\StartMenuInternet\IEXPLORE.EXE\InstallInfo","ShowIconsCommand",0x00020000,"%systemroot%\system32\shmgrate.exe OCInstallShowIE"


; hivedef.inf
HKCU,"Control Panel\Screen Saver.Marquee","Text",0x00000002,"%SCREEN_SAVER_MARQUEE_TEXT%"
HKCU,"Control Panel\Screen Saver.Marquee","Font",0x00000000,"%SCREEN_SAVER_MARQUEE_FONT%"

HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","AppData",0x00020000,"%U_SHELL_FOLDERS_APPDATA%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","CD Burning",0x00020000,"%U_SHELL_FOLDERS_CDBURN%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Desktop",0x00020000,"%U_SHELL_FOLDERS_DESKTOP%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Favorites",0x00020000,"%U_SHELL_FOLDERS_FAVORITES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","NetHood",0x00020000,"%U_SHELL_FOLDERS_NETHOOD%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal",0x00020000,"%U_SHELL_FOLDERS_PERSONAL%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","PrintHood",0x00020000,"%U_SHELL_FOLDERS_PRINTHOOD%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Programs",0x00020000,"%U_SHELL_FOLDERS_PROGRAMS%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Recent",0x00020000,"%U_SHELL_FOLDERS_RECENT%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","SendTo",0x00020000,"%U_SHELL_FOLDERS_SENDTO%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Start Menu",0x00020000,"%U_SHELL_FOLDERS_START_MENU%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Startup",0x00020000,"%U_SHELL_FOLDERS_STARTUP%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Templates",0x00020000,"%U_SHELL_FOLDERS_TEMPLATES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Cookies",0x00020000,"%U_SHELL_FOLDERS_COOKIES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Pictures",0x00020000,"%U_SHELL_FOLDERS_MYPICTURES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Music",0x00020000,"%U_SHELL_FOLDERS_MYMUSIC%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Video",0x00020000,"%U_SHELL_FOLDERS_MYVIDEO%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Local Settings",0x00020000,"%U_SHELL_FOLDERS_LOCAL_SETTINGS%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Local AppData",0x00020000,"%U_SHELL_FOLDERS_LOCAL_APPDATA%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Cache",0x00020000,"%U_SHELL_FOLDERS_CACHE%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","History",0x00020000,"%U_SHELL_FOLDERS_HISTORY%"

HKCU,"Environment","TEMP",0x00020000,"%TEMP_DIR%"
HKCU,"Environment","TMP",0x00020000,"%TEMP_DIR%"
; international
HKCU,"Control Panel\International","iCalendarType",0x00000000,"%INTL_ICALENDAR%"
HKCU,"Control Panel\International","iCountry",0x00000000,"%INTL_ICOUNTRY%"
HKCU,"Control Panel\International","iCurrDigits",0x00000000,"%INTL_ICURRDIGITS%"
HKCU,"Control Panel\International","iCurrency",0x00000000,"%INTL_ICURRENCY%"
HKCU,"Control Panel\International","iDate",0x00000000,"%INTL_IDATE%"
HKCU,"Control Panel\International","iDigits",0x00000000,"%INTL_IDIGITS%"
HKCU,"Control Panel\International","iFirstDayOfWeek",0x00000000,"%INTL_IFIRSTWEEKDAY%"
HKCU,"Control Panel\International","iLZero",0x00000000,"%INTL_ILZERO%"
HKCU,"Control Panel\International","iMeasure",0x00000000,"%INTL_IMEASURE%"
HKCU,"Control Panel\International","iNegCurr",0x00000000,"%INTL_INEGCURR%"
HKCU,"Control Panel\International","iTime",0x00000000,"%INTL_ITIME%"
HKCU,"Control Panel\International","iTLZero",0x00000000,"%INTL_ITLZERO%"
HKCU,"Control Panel\International","Locale",0x00000000,"%INTL_LOCALE%"
HKCU,"Control Panel\International","s1159",0x00000000,"%INTL_S1159%"
HKCU,"Control Panel\International","s2359",0x00000000,"%INTL_S2359%"
HKCU,"Control Panel\International","sCountry",0x00000000,"%INTL_SCOUNTRY%"
HKCU,"Control Panel\International","sCurrency",0x00000000,"%INTL_SCURRENCY%"
HKCU,"Control Panel\International","sDate",0x00000000,"%INTL_SDATE%"
HKCU,"Control Panel\International","sDecimal",0x00000000,"%INTL_SDECIMAL%"
HKCU,"Control Panel\International","sLanguage",0x00000000,"%INTL_SLANGUAGE%"
HKCU,"Control Panel\International","sList",0x00000000,"%INTL_SLIST%"
HKCU,"Control Panel\International","sLongDate",0x00000000,"%INTL_SLONGDATE%"
HKCU,"Control Panel\International","sShortDate",0x00000000,"%INTL_SSHORTDATE%"
HKCU,"Control Panel\International","sThousand",0x00000000,"%INTL_STHOUSAND%"
HKCU,"Control Panel\International","sTime",0x00000000,"%INTL_STIME%"
HKCU,"Control Panel\International","sTimeFormat",0x00000000,"%INTL_STFORMAT%"
HKCU,"Control Panel\International\Geo","Nation",0x00000000,"%INTL_GEO_NATION%"

HKCU,"Control Panel\Desktop","UserPreferencesMask",0x00030003,\
	%USER_PREF_MASK_0%,3e,01,80


; Edit this if your time zone is different to the one listed.
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x00010000,\
		"409",   "4",\
		"1009",  "4",\
		"80a",   "30",\
		"440a",  "30",\
		"480a",  "30",\
		"4c0a",  "30",\
		"c0c",   "35",\
		"240a",  "45",\
		"280a",  "45",\
		"300a",  "45",\
		"200a",  "55",\
		"340a",  "55",\
		"3c0a",  "55",\
		"400a",  "55",\
		"500a",  "55",\
		"416",   "65",\
		"2c0a",  "70",\
		"380a",  "70",\
		"422",   "85",\
		"438",   "85",\
		"441",   "85",\
		"809",   "85",\
		"816",   "85",\
		"1001",  "85",\
		"1401",  "85",\
		"1404",  "85",\
		"1809",  "85",\
		"2009",  "85",\
		"2401",  "85",\
		"2409",  "85",\
		"2801",  "85",\
		"2809",  "85",\
		"3001",  "85",\
		"3409",  "85",\
		"4001",  "85",\
		"40f",   "85",\
		"41c",   "85",\
		"43e",   "85",\
		"83e",   "85",\
		"100a",  "85",\
		"140a",  "85",\
		"140c",  "85",\
		"180a",  "85",\
		"180c",  "85",\
		"1c01",  "85",\
		"1c0a",  "85",\
		"2c01",  "85",\
		"2c09",  "85",\
		"3c01",  "85",\
		"405",   "95",\
		"40e",   "95",\
		"424",   "95",\
		"41b",   "95",\
		"81a",   "95",\
		"c1a",   "95",\
		"402",   "100",\
		"415",   "100",\
		"1801",  "100",\
		"41a",   "100",\
		"42f",   "100",\
		"403",   "105",\
		"406",   "105",\
		"427",   "105",\
		"813",   "105",\
		"827",   "105",\
		"40a",   "105",\
		"40c",   "105",\
		"42d",   "105",\
		"80c",   "105",\
		"c0a",   "105",\
		"407",   "110",\
		"410",   "110",\
		"413",   "110",\
		"414",   "110",\
		"807",   "110",\
		"810",   "110",\
		"814",   "110",\
		"1007",  "110",\
		"1407",  "110",\
		"41d",   "110",\
		"c07",   "110",\
		"100c",  "110",\
		"418",   "115",\
		"c01",   "120",\
		"425",   "125",\
		"426",   "125",\
		"40b",   "125",\
		"81d",   "125",\
		"408",   "130",\
		"423",   "130",\
		"41f",   "130",\
		"40d",   "135",\
		"436",   "140",\
		"3009",  "140",\
		"1c09",  "140",\
		"419",   "145",\
		"401",   "150",\
		"801",   "150",\
		"3401",  "150",\
		"429",   "160",\
		"2001",  "165",\
		"3801",  "165",\
		"420",   "185",\
		"439",   "190",\
		"421",   "205",\
		"41e",   "205",\
		"42a",   "205",\
		"804",   "210",\
		"c04",   "210",\
		"1004",  "215",\
		"404",   "220",\
		"412",   "230",\
		"812",   "230",\
		"411",   "235",\
		"c09",   "260",\
		"1409",  "290"


HKR,"1174\Files\13","Action",0x00010001,4
HKR,"1174\Files\13","Item",0000000000,"%GAMES_SOLITAIRE_LNK%"
HKR,"1174\Files\14","Action",0x00010001,4
HKR,"1174\Files\14","Item",0000000000,"%GAMES_MINESWEEPER_LNK%"
HKR,"1174\Files\15","Action",0x00010001,4
HKR,"1174\Files\15","Item",0000000000,"%GAMES_FREECELL_LNK%"

[DelReg]


[Strings]

; Desktop
MY_COMPUTER="%Computername%"
NAME_LOCAL="My Computer"
NETWORK_NEIGHBORHOOD="Networks"
DESC_IE="Mosaic"
LMSIE4		 = "Internet Explorer"

; International settings

INSTALL_LANGUAGE="0C09"
INSTALL_LOCALE="00000C09"
;
INTL_GEO_NATION="12"
INTL_ICALENDAR="1"
INTL_ICOUNTRY="61"
INTL_ICURRDIGITS="2"
INTL_ICURRENCY="0"
INTL_IDATE="2"
INTL_IDIGITS="2"
INTL_IFIRSTWEEKDAY="6"
INTL_ILZERO="1"
INTL_IMEASURE="1"
INTL_INEGCURR="1"
INTL_ITIME="1"
INTL_ITLZERO="1"
INTL_LOCALE="00000C09"
INTL_S1159="AM"
INTL_S2359="PM"
INTL_SCOUNTRY="Australia"
INTL_SCURRENCY="$"
INTL_SDATE="/"
INTL_SDECIMAL="."
INTL_SLANGUAGE="ENA"
INTL_SLIST=","
INTL_SLONGDATE="dddd, d MMMM, yyyy"
INTL_SSHORTDATE="yyyy/MM/dd"
INTL_STHOUSAND=","
INTL_STIME=":"
INTL_STFORMAT="HH:mm:ss"
USER_PREF_MASK_0="9e"

; Put these under Accessories
GAMES_FREECELL_LNK="Accessories\games\Freecell.lnk"
GAMES_MINESWEEPER_LNK="Accessories\games\Minesweeper.lnk"
GAMES_SOLITAIRE_LNK="Accessories\games\Solitaire.lnk"

; Configure Marquee
SCREEN_SAVER_MARQUEE_FONT="Georgia"
SCREEN_SAVER_MARQUEE_TEXT="Windows NT 5.10.2600"

; User folders
DEFAULT_PROFILES_DIR="%SystemDrive%\XPUser"
TEMP_DIR="%USERPROFILE%\Temp"
U_SHELL_FOLDERS_APPDATA="%USERPROFILE%\AppData"
U_SHELL_FOLDERS_CDBURN="%USERPROFILE%\AppData\CDBurn"
U_SHELL_FOLDERS_DESKTOP="%USERPROFILE%\Desktop"
U_SHELL_FOLDERS_FAVORITES="%USERPROFILE%\Favorites"
U_SHELL_FOLDERS_NETHOOD="%USERPROFILE%\NetHood"
U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\Personal"
U_SHELL_FOLDERS_PRINTHOOD="%USERPROFILE%\PrintHood"
U_SHELL_FOLDERS_PROGRAMS="%USERPROFILE%\Start Menu\Programs"
U_SHELL_FOLDERS_RECENT="%USERPROFILE%\Recent"
U_SHELL_FOLDERS_SENDTO="%USERPROFILE%\SendTo"
U_SHELL_FOLDERS_START_MENU="%USERPROFILE%\Start Menu"
U_SHELL_FOLDERS_STARTUP="%USERPROFILE%\Start Menu\Programs\Startup"
U_SHELL_FOLDERS_TEMPLATES="%USERPROFILE%\Templates"
U_SHELL_FOLDERS_COOKIES="%USERPROFILE%\Cookies"
U_SHELL_FOLDERS_MYPICTURES="%USERPROFILE%\Personal\Pictures"
U_SHELL_FOLDERS_MYMUSIC="%USERPROFILE%\Personal\Music"
U_SHELL_FOLDERS_MYMUSIC="%USERPROFILE%\Personal\Video"
U_SHELL_FOLDERS_LOCAL_SETTINGS="%USERPROFILE%\Local"
U_SHELL_FOLDERS_LOCAL_APPDATA="%USERPROFILE%\Local\AppData"
U_SHELL_FOLDERS_CACHE="%USERPROFILE%\Temporary Internet Files"
U_SHELL_FOLDERS_HISTORY="%USERPROFILE%\History"



How to remove advertisement from MSFN

#2
Oleg_II

Oleg_II

    Senior Member

  • Member
  • PipPipPipPip
  • 679 posts
  • Joined 06-August 04
Interesting :) It sounds like making some WINNT.SIF work.

Does it mean I can include all tweaks from my INSTALL.INF that is ran say with CMDLINES.TXT in HIVEFIX.INF and they will install the same way?
Will it work in W2k?
What are the modifiers? Can you give an example?
Posted Image

#3
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
HIVEFIX works the same way in Win2k as it does for WinXP. The files to modify are given in the first section. For example, you have to add entries for hivefix.inf in both dosnet.inf (which controls copy of the files to $win_nt$.~LS), and txtsetup.sif (from $win_nt$.~LS to the final locations).

Rather than modifying the files like HIVEDEF.INF and so forth, we modify HIVEFIX.INF. The two lines about delreg=hivefix.inf,addreg, and addreg=hivefix.inf, addreg go at the end of the section, because that's where the mods are done.

Much of what i did with hivefix.inf was to try localise the setup. The big time-zone thing is to allow you to change the default time-zone for countries with more than one time zone. In australia (0C09), the default time zone is 255 (Sydney and Melbourne), but i changed it to 260 (Brisbane). So this entry appears here.

The stuff in the "homegrown" section (command processor, quickedit), all work. The stuff in the "shell fixes" (eg Hidden), generally do not work. The shell folders do work. Instead of getting something like \WENDY\MY DOCUMENTS\MY PICTURES, you get WENDY\PERSONAL\PICTURES. Application Data is also created explicitly by some apps, so it's interesting to see who uses what.

Tweakui and directx control panels work. With this, you get both under "Performance and Maintainance" section in control panel. I thought about putting directx.cpl under "Audio" section (0x04), but did not implement this.

Shell folders, both the base and subfolders, do work. I do occasionally get an application data\temp folder, but this is because the user directories are reset later on.

To localise the file for your own use, modify the bit at the bottom, in strings.

The days of the week run 0 Mon to 6 Sun. The first day of the week is set to 0 for monday, or 6 for sunday.

Measurements are set to 0 (false) or 1 (true).

The Marque stuff sets the default for what Marque screen saver will show.

The registry keys are of the form

[Addreg]
HKLM, Software\Microsoft\theapp\thekey, thevalue, xHEXCODE, data
x00000000,"sample string"  =  reg_sz  
x00010000,"line0\0line1\0line2 = reg_multi_sz
x00020000,"%username%'s Deletium"  =  reg_expand_sz

x00000001,DE,AD,BE,EF  = reg_binary
x00010001, 54 (or 0x36)   reg_dword 
x00020001, =  reg_none

I am still looking for a place to hide the regfixes without having to implement either winnt.sif or any of that user-modified stuff.

W

#4
Jondar

Jondar

    Newbie

  • Member
  • 14 posts
  • Joined 31-August 04

...The shell folders do work. Instead of getting something like \WENDY\MY DOCUMENTS\MY PICTURES, you get WENDY\PERSONAL\PICTURES. Application Data is also created explicitly by some apps, so it's interesting to see who uses what...


Yes!

This is exactly what I've been looking for! I hate the "My..." beginning to the user shell folders and at the moment, I do some registry editing and moving of folders after setup is completed, only to find that most of the time, my registry changes for shell folders don't "stick". I've been looking for a way to get it configured the way I want by Windows XP Setup itself.

Just so I understand things correctly: This will edit the registry, and create the exact folders I specify?

os2fan2, is your supplied sample hivefix.inf flexible enough? I mean, can I just take what you posted, remove everything but the shell folders section and the relevant strings, and it should still work? I don't particularly need the other stuff (though some of it may stay :) )

-- Jondar
Jondar of varos.net

#5
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
You can cut out or customise whole sections. For example, if you use the local regional settings, you don't have to have to hunt them down on each install.

It is pretty much broken into separate sections for the [Addreg] stuff. Just delete the addreg stuff you don't want, and you just add it.

#6
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
Much of this also works under Windows 2000 as well. I used the XP version, and mainly removed things. Some things had to be entered to get it to work properly.



Still not working: My Pictures.

Tweakui should run if i ever get the files to copy (seems like txtsetup is missing lines), along with the command to tweakmeup.

An interesting bug is the appearence of an unnamed "my computer" icon in the start menu. This allows you to open my computer from the start menu,

[AddReg]
HKCU,"Console","InsertMode",0x00010001,1
HKCU,"Console","QuickEdit", 0x00010001,0
HKLM,"Software\Microsoft\Command Processor","CompletionChar",0x00010001,9
HKCU,"Software\Microsoft\Command Processor","CompletionChar",0x00010001,9
HKLM,"Software\Microsoft\Command Processor","PathCompletionChar",0x00010001,9
HKCU,"Software\Microsoft\Command Processor","PathCompletionChar",0x00010001,9

; TweakUI 1.33
HKLM,"Software\Microsoft\Windows\CurrentVersion\Run",,,"RUNDLL32.EXE TWEAKUI.CPL,TweakMeUp"

This is extracted from the SI.TXT (which contains instructions for dosnet.inf and txtsetup.sif

------ dosnet.inf ---------------------------------------------

d1,hivefix.inf
d1,directx.cpl
d1,diskpart.exe
d1,kill.exe
d1,reg.exe
d1,setx.exe
d1,setup50.bmp
d1,tlist.exe
d1,tweakui.cpl
d1,tweakui.hlp
d1,tweakui.cnt

------ txtsetup.sif --------------------------------------------

[SourceDisksFiles]
hivefix.inf  = 1,,,,,,_x,20,3,3
directx.cpl  = 2,,,,,,,2,0,0
diskpart.exe = 2,,,,,,,2,0,0
kill.exe	 = 2,,,,,,,2,0,0
reg.exe	  = 2,,,,,,,2,0,0
setx.exe	 = 2,,,,,,,2,0,0
tlist.exe	= 2,,,,,,,2,0,0
setup50.bmp  = 2,,,,,,,2,0,0
tweakui.cpl  = 2,,,,,,,2,0,0
tweakui.hlp  = 2,,,,,,,21,0,0
tweakui.cnt  = 2,,,,,,,21,0,0

BITMAPS
----------

Most of the Win2k gifs appear in WinME as well, so i wondered if one could smuggle in the rest. This can indeed be done!

The pictures are: cliff in clouds.jpg, diagonal sands.jpg, iceberg.jpg, shed in fields.jpg, smokey light.jpg, vinca.jpg, windows millenium.jpg, and yosetime.jpg. Neither windows millenium.jpg not windows 2000.jpg are branded, this is implemented by a gif file on a web page.

You get reshack.exe, and the appropriate files.

Import the pictures into a resource type '23', under 8.3 names, eg CLIFFINC.JPG. The language should be the same as the others (eg 1033 = dec for 0x0409)You will see already the others there. Go to string table \ 189 \ 1033, and add the appropriate bitmaps there, eg

3012, "cliffinc.jpg;Cliff in Clouds.jpg"

This will make the file twice the size, but the thing works!

W

#7
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
The explorer link file in start-menu is actually a file .LNK, a valid name, but because there is nothing before the extension, shows up with no name. Neat trick! Still do not know who is causing it.

As for the MY PICTURES bug, i suspect this is due to something in WEBVW.DLL, so i will have a look at this tonight.

W

#8
mohammadgerami

mohammadgerami

    Newbie

  • Member
  • 20 posts
  • Joined 13-February 07
ok good very good thanks!

#9
os2fan2

os2fan2

    Advanced Member

  • Member
  • PipPipPip
  • 421 posts
  • Joined 09-September 04
More interesting tweaks for hivefix.inf

This one is undocumented, but you can replicate the Vista user\public\ and user\default, rather than the previous version of "documents and settings\all users" and "documents and settings\default user" directories. Works a treat.

; This goes in [AddReg] section:

HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020002,"%DEFAULT_PROFILES_DIR%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","AllUsersProfile",0x00000000,"%ALL_USERS%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","DefaultUserProfile",0x00000000,"%DEFAULT_USER%"

; This goes into [Strings]

; Shell Folders
; default users at \users\default,  all users at \users\public,  as in vista.
DEFAULT_PROFILES_DIR="%SystemDrive%\USERS"
DEFAULT_USER="Default"
ALL_USERS="Public"

I tried another trick similar to the vista setup, where all of the shell folders like desktop &c go in a subdirectory under the userprofile, eg \USERS\WENDY\ICONS\DESKTOP. The ICONS directory would then have the desktop, sendto, and other .lnk files living side by side. This is how vista does it. It does not work under Windows 2k.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users