无忧启动论坛

标题: 如果让系统自动安装自己编写的INF文件 [打印本页]

作者: sxhzx    时间: 2009-12-3 13:10
标题: 如果让系统自动安装自己编写的INF文件
如果。。我在做个安装盘。。。我的INF文件是内容如下:

[Version]
Signature = "$Windows NT$"
DriverVer=07/01/2001,5.1.2535.0
[DefaultInstall]
AddReg = AddReg
DelReg = DelRegFirst
[AddReg]
HKU,".DEFAULT\Control Panel\Cursors"
HKU,".DEFAULT\Control Panel\Cursors","",0x00000000,"Windows 默认"
HKU,".DEFAULT\Control Panel\Cursors","Arrow",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Arrow.cur"
HKU,".DEFAULT\Control Panel\Cursors","Help",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Help_S.cur"
HKU,".DEFAULT\Control Panel\Cursors","AppStarting",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\AppS.ani"
HKU,".DEFAULT\Control Panel\Cursors","Wait",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Wait_S.ani"
HKU,".DEFAULT\Control Panel\Cursors","NWPen",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Handw.cur"
HKU,".DEFAULT\Control Panel\Cursors","No",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\NO_S.cur"
HKU,".DEFAULT\Control Panel\Cursors","SizeNS",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Size_4.cur"
HKU,".DEFAULT\Control Panel\Cursors","SizeWE",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Size_3.cur"
HKU,".DEFAULT\Control Panel\Cursors","Crosshair",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Cross_S.cur"
HKU,".DEFAULT\Control Panel\Cursors","IBeam",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\IBeam.cur"
HKU,".DEFAULT\Control Panel\Cursors","SizeNWSE",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Size_2.cur"
HKU,".DEFAULT\Control Panel\Cursors","SizeNESW",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Size_1.cur"
HKU,".DEFAULT\Control Panel\Cursors","SizeAll",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\SizeAll.cur"
HKU,".DEFAULT\Control Panel\Cursors","UpArrow",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\UpArrow.cur"
HKU,".DEFAULT\Control Panel\Cursors","Link",0x00000000,"%WinDir%\Resources\Themes\LUNA\Cursors\Hand.cur"
[DelRegFirst]
HKCU,"Control Panel\Cursors\Schemes"
[update]
HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce","MyUpdate",0x00020002,"%systemroot%\regsvr32 /s %WinDir%\Resources\Themes\LUNA\Rtback\ConBG.dll"



本来想 txtsetup.sif 来添
我修改了
[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 = Cursors.inf,AddReg

[HiveInfs.Fresh.RemoteBoot]
AddReg = hivesys.inf,AddReg.RemoteBoot

[HiveInfs.Upgrade]
DelReg = hivesft.inf,DelRegFirst
DelReg = hivedef.inf,DelReg
AddReg = hivedef.inf,AddReg
DelReg = hivesys.inf,DelReg
AddReg = hivesys.inf,AddReg
AddReg = hivesys.inf,AddReg.Upgrade
DelReg = hivesft.inf,DelReg
AddReg = hivesft.inf,AddReg
AddReg = hivesft.inf,AddReg.Upgrade
DelReg = hivecls.inf,DelReg
AddReg = hivecls.inf,AddReg
AddReg = hiveusd.inf,AddReg
DelReg = dmreg.inf,DM.DelReg
AddReg = dmreg.inf,DM.AddReg
DelReg = Cursors.inf,DelRegFirst

dosnet.inf [Files]加了
d1,Cursors.inf
结果出示。如图


[ 本帖最后由 sxhzx 于 2009-12-3 13:18 编辑 ]

image002.jpg (11.72 KB, 下载次数: 54)

image002.jpg

作者: wjgyz740526    时间: 2009-12-3 14:39
在SYSOC.INI文件添加一行就可以了——nlite就是这么做的
作者: wjgyz740526    时间: 2009-12-3 14:40
其实安装这个inf文件的方法太多了

1.winnt.sif
2.svcpack
...
作者: sxhzx    时间: 2009-12-7 00:12
我不是用无人的那个哦
作者: wjgyz740526    时间: 2009-12-7 08:37
无人值守与否在winnt.sif中控制,跟上面说的无关
作者: sxhzx    时间: 2009-12-7 17:58
wjgyz740526
那你说一下怎么用啊
作者: wjgyz740526    时间: 2009-12-7 22:50
你问哪个?假如是自己的inf文件名为set.inf,那么在txtsetup.sif、dosnet.inf文件中添加以正确复制,然后到SYSOC.INI文件添加一行——如果你是精简版的系统,不出意外的话会有nlite的

具体如下:
txtsetup.sif文件中在[SourceDisksFiles]字段添加
set.inf= 100,,,,,,,20,0,0
dosnet.inf文件中在[Files]字段添加
d1,set.inf
SYSOC.INI文件在[Components]的最后添加
SET = ocgen.dll,OcEntry,set.inf,HIDE,7

winnt.sif无人值守的那就太多了,一搜一大把




欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/) Powered by Discuz! X3.3