在系统维护板块看到的Txtsetup.sif使用。
用 txtsetup.sif 来添加自定义的注册表条目
每次文本安装模式即将结束时, 安装程序就会利用txtsetup.sif 中的某些定义来创建注册表(文件复制结束时). 如果是全新安装的话, 安装程序就会按照 txtsetup.sif 的 [HiveInfs.Fresh] 区段中的定义来生成注册表. 你可以使用这个区段来添加你自己的注册表条目.
如果你已经把你的注册表设置保存为一个 .reg 文件的话,
那么你需要用.inf 文件导入这些设置.
将你的 .reg 文件重命名为 settings.reg 并将其置入i386 文件夹中.
将以下内容复制到一个新文件中并另存为settings.inf,然后将其保存到 i386 文件夹中.
[Version]
Signature = "$Windows NT$"
DriverVer=07/01/2001,5.1.2600.1106[update]
HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce",
"MyUpdate",0x00020002,"%systemroot%\regedit.exe /s %systemroot%\system32\settings.reg"
添加 inf 条目
如果你已经有了一个 .inf 文件, 那么将其复制到 i386 文件夹中并将其重命名为settings.inf. 并确保这个 .inf 文件中有个名为 [update] 区段
只有这个区段下的设置会被使用!
你可以用 makecab.exe 把 settings.inf 压缩成 settings.in_, 但这只是可选的.
添加方法
打开 txtsetup.sif 并转到 [HiveInfs.Fresh], 按以下添加一行.
[HiveInfs.Fresh]
AddReg = hivedef.inf,AddReg
AddReg = hivesys.inf,AddReg
AddReg = hivesft.inf,AddReg
AddReg = hivecls.inf,AddReg
AddReg = hiveusd.inf,AddReg
AddReg = dmreg.inf,DM.AddReg
AddReg = settings.inf,update
再把以下 2 行添加到 txtsetup.sif 的 [SourceDisksFiles] 区段下.
如果你要使用一个 .reg 文件, 那么就要添加第二行, 不需要的只需添加第一行.
settings.inf =1,,,,,,_x,3,,3
settings.reg =100,,,,,,,2,0,0
把以下 2 行添加到dosnet.inf 的 [Files] 区段下. 如果你要使用一个 .reg 文件,
那么就要添加第二行, 不需要的只需添加第一行.
d1,settings.inf
d1,settings.reg
现在开始安装 XP, 当文本安装模式结束时就会导入你的注册表设置了.
你不需要使用无人值守安装方式.
我将原来自己集成的优化注册表reg文件转化成inf文件:
[Version]
Signature="$Windows NT$"
DriverVer=07/01/2001,5.1.2600.1106
[AddReg]
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Security","BlockXBM",0x00010001,00,00,00,00
HKCR,"Folder\shell\命令提示符\Command",,,"C:\windows\system32\cmd.exe cd ""%%1"""
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoRecentDocsMenu",0x00010001,01,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoLowDiskSpaceChecks",0x00010001,01,00,00,00
HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoRecentDocsMenu",0x00010001,01,00,00,00
HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","ClearRecentDocsonexit",0x00010001,01,00,00,00
HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer","Link",0x00010001,00,00,00,00
HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPerServer",0x00010001,20,00,00,00
HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPer1_0Server",0x00010001,20,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPerServer",0x00010001,20,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPer1_0Server",0x00010001,20,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","SackOpts",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","TcpWindowSize",0x00010001,c0,eb,03,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Tcp1323Opts",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","DefaultTTL",0x00010001,40,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","EnablePMTUBHDetect",0x00010001,00,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","EnablePMTUDiscovery",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","GlobalMaxTcpWindowSize",0x00010001,c0,eb,03,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{2227A280-3AEA-1069-A2DE-08002B30309D}",,,"Printers"
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","TcpNumConnections",0x00010001,e8,03,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPer1_0Server",0x00010001,09,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Internet Settings","MaxConnectionsPerServer",0x00010001,09,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","SackOpts",0x00010001,00,00,00,01
HKLM,"SYSTEM\ControlSet001\Services\Tcpip\Parameters","SackOpts",0x00010001,00,00,00,01
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Tcp1323Opts",0x00010001,00,00,00,03
HKLM,"SYSTEM\ControlSet001\Services\Tcpip\Parameters","Tcp1323Opts",0x00010001,00,00,00,03
HKLM,"System\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\","EnablePrefetcher",0x00010001,01,00,00,00
HKLM,"System\ControlSet001\Control\","WaitToKillServiceTimeout",,"1000"
HKCU,"Control Panel\Desktop","AutoEndTasks",,"1"
HKCU,"Control Panel\Desktop","HungAppTimeout",,"200"
HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",,"1000"
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","ConfigFileAllocSize",0x00010001,f4,01,00,00
HKCU,"Control Panel\desktop","MenuShowDelay",,"0"
HKLM,"SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction","Enable",,"Y"
HKLM,"SYSTEM\CurrentControlSet\Services\Vxd\BIOS","CPUPriority",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Vxd\BIOS","PCIConcur",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Vxd\BIOS","FastDRAM",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\Vxd\BIOS","AGPConcur",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","SFCDisable",0x00010001,9d,ff,ff,ff
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer","AlwaysUnloadDLL",0x00010001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management","LargePageMinimum",0x00010001,ff,ff,ff,ff
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz","NoRun",0x00010001,01,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Applets\Tour","RunCount",0x00010001,00,00,00,00
HKLM,"Software\Microsoft\Windows\CurrentVersion\Applets\Tour","RunCount",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer","Link",0x00010001,0,0,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","AllOrNone",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","IncludeMicrosoftApps",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","IncludeWindowsApps",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","IncludeKernelFaults",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","DoReport",0x00010001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\PCHealth\ErrorReporting","ShowUI",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Start_NotifyNewApps",0x00010001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update","AUOptions",0x00010001,04,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\srservice","Start",0x00010001,04,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore","DisableSR",0x00010001,01,00,00,00
HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","Attributes",0x00010001,50,01,00,20
HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","CallForAttributes",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{450D8FBA-AD25-11D0-98A8-0800361B1103}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{20D04FE0-3AEA-1069-A2D8-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{871C5380-42A0-1069-A2EA-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{645FF040-5081-101B-9F08-00AA002F954E}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel","{450D8FBA-AD25-11D0-98A8-0800361B1103}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel","{20D04FE0-3AEA-1069-A2D8-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel","{871C5380-42A0-1069-A2EA-08002B30309D}",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel","{645FF040-5081-101B-9F08-00AA002F954E}",0x00010001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","2",,"time-a.nist.gov"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","3",,"time-b.nist.gov"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","4",,"time-nw.nist.gov
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]
"HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop","TaskbarWinXP",0x00010001,0c,00,00,00,08,00,00,00,02,00,00,00,00,00,00,00,b0,e2,2b,\
d8,64,57,d0,11,a9,6e,00,c0,4f,d7,05,a2,22,00,1c,00,0a,01,00,00,1a,00,00,00,\
01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,4c,00,00,00,01,14,02,00,00,\
00,00,00,c0,00,00,00,00,00,00,46,83,00,00,00,10,00,00,00,a0,b0,48,5e,89,8d,\
bd,01,00,d8,9e,e4,2a,8d,bd,01,00,45,fe,5e,89,8d,bd,01,00,00,00,00,00,00,00,\
00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,13,01,14,00,1f,0f,e0,4f,\
d0,20,ea,3a,69,10,a2,d8,08,00,2b,30,30,9d,19,00,23,44,3a,5c,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,cd,97,15,00,31,00,00,00,00,00,af,24,5c,\
b9,10,80,57,69,6e,6e,74,00,00,20,00,31,00,00,00,00,00,af,24,a3,b9,10,00,50,\
72,6f,66,69,6c,65,73,00,50,52,4f,46,49,4c,45,53,00,19,00,31,00,00,00,00,00,\
c1,24,08,92,10,00,69,65,35,30,30,2e,30,30,30,00,00,28,00,31,00,00,00,00,00,\
c1,24,08,92,10,00,41,70,70,6c,69,63,61,74,69,6f,6e,20,44,61,74,61,00,41,50,\
50,4c,49,43,7e,31,00,21,00,31,00,00,00,00,00,c5,22,9d,91,10,00,4d,69,63,72,\
6f,73,6f,66,74,00,4d,49,43,52,4f,53,7e,31,00,29,00,31,00,00,00,00,00,d3,22,\
32,a6,10,00,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,00,49,4e,54,\
45,52,4e,7e,31,00,24,00,31,00,00,00,00,00,db,22,76,ba,10,00,51,75,69,63,6b,\
20,4c,61,75,6e,63,68,00,51,55,49,43,4b,4c,7e,31,00,00,00,8d,00,00,00,1c,00,\
00,00,01,00,00,00,1c,00,00,00,36,00,00,00,0d,f0,ad,ba,8c,00,00,00,1a,00,00,\
00,03,00,00,00,e7,18,2d,23,10,00,00,00,49,45,35,30,30,5f,58,31,43,00,43,3a,\
5c,57,49,4e,4e,54,5c,50,72,6f,66,69,6c,65,73,5c,49,45,35,30,30,2e,30,30,30,\
5c,41,70,70,6c,69,63,61,74,69,6f,6e,20,44,61,74,61,5c,4d,69,63,72,6f,73,6f,\
66,74,5c,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,\
6b,20,4c,61,75,6e,63,68,00,00,10,00,00,00,05,00,00,a0,1a,00,00,00,a3,00,00,\
00,00,00,00,00,08,00,00,00,02,00,00,00,cc,00,00,00,01,00,00,00,03,00,00,00,\
4a,00,00,00,01,00,00,00,40,00,32,00,e6,01,00,00,c4,24,15,9f,20,00,4c,61,75,\
6e,63,68,20,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,20,42,72,6f,\
77,73,65,72,2e,6c,6e,6b,00,4c,41,55,4e,43,48,7e,32,2e,4c,4e,4b,00,00,00,40,\
00,00,00,02,00,00,00,36,00,32,00,48,02,00,00,c4,24,15,9f,20,00,4c,61,75,6e,\
63,68,20,4f,75,74,6c,6f,6f,6b,20,45,78,70,72,65,73,73,2e,6c,6e,6b,00,4c,41,\
55,4e,43,48,7e,31,2e,4c,4e,4b,00,00,00,36,00,00,00,00,00,00,00,2c,00,32,00,\
51,00,00,00,ec,22,46,39,20,00,53,68,6f,77,20,44,65,73,6b,74,6f,70,2e,73,63,\
66,00,53,48,4f,57,44,45,7e,31,2e,53,43,46,00,00,00,52,00,00,00,e0,00,00,00,\
00,00,00,00,16,00,00,00,00,00,00,00,00,00,00,00,16,00,00,00,00,00,00,00,01,\
00,00,00,01,00,00,00,aa,4f,28,68,48,6a,d0,11,8c,78,00,c0,4f,d9,18,b4,37,02,\
00,00,e0,00,00,00,00,00,00,00,16,00,00,00,00,00,00,00,00,00,00,00,16,00,00,\
00,00,00,00,00,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\Windows","NoPopUpsOnBoot",,"1"
HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","LogEvent",0x00010001,00,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","Sendabout:",0x00010001,00,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","AutoReboot",0x00010001,00,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","CrashDumpEnabled",0x00010001,00,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg","RemoteRegAccess",0x00010001,01,00,00,00
HKCU,"Software\Microsoft\Internet Explorer\Main","Enable AutoImageResize",,"yes"
HKLM,"SYSTEM\CurrentControlSet\Services\atapi\Parameters","EnableBigLba",0x00010001,01,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update","AUOptions",0x00010001,02,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Start_ShowNetPlaces",0x00010001,00,00,00,01
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Start_ShowHelp",0x00010001,00,00,00,00
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Start_ShowSetProgramAccessAndDefaults",0x00010001,00,00,00,0
命名为settings.inf保存在i386文件夹内。然后在txtsetup.sif的[HiveInfs.Fresh]区段下添加
AddReg = settings.inf,AddReg
在[SourceDisksFiles]区段下添加
settings.inf =1,,,,,,_x,3,,3
在dosnet.inf 的 [Files] 区段下添加
d1,settings.inf
制作成ISO光盘镜像后用虚拟机加载到应用inf文件时出错,提示,无法应用当前inf设置。不知道哪里错了。我只是将txtsetup.sif的[HiveInfs.Fresh]区段下"AddReg = settings.inf,update"改为"AddReg = settings.inf,AddReg",但在settings.inf文件中我使用的就是AddReg区域段,和txtsetup.sif保持一致。不知道为什么出错无法应用。
[ 本帖最后由 太皇太子 于 2006-8-4 06:42 PM 编辑 ] |