无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
楼主: 江南一根葱
打印 上一主题 下一主题

[分享] 从"五秒制作完成网络骨头版pe"瞎改的从原版iso制作网络骨头版pe批处理0422

    [复制链接]
91#
发表于 2021-2-10 22:57:07 | 只看该作者
江南一根葱 发表于 2021-2-10 22:38
mpssvc应该无关的,我试了下net stop等提示是没有启动windows defender firewall服务
大概有点思路了, ...

好的,我刚才去给娃冲奶了。明天再折腾
回复

使用道具 举报

92#
发表于 2021-2-10 22:57:29 | 只看该作者
江南一根葱 发表于 2021-2-10 22:38
mpssvc应该无关的,我试了下net stop等提示是没有启动windows defender firewall服务
大概有点思路了, ...

好的,我刚才去给娃冲奶了。明天再折腾
回复

使用道具 举报

93#
发表于 2021-2-10 22:58:06 | 只看该作者
江南一根葱 发表于 2021-2-10 22:38
mpssvc应该无关的,我试了下net stop等提示是没有启动windows defender firewall服务
大概有点思路了, ...

好的,我刚才去给娃冲奶了。明天再折腾
回复

使用道具 举报

94#
发表于 2021-2-11 09:59:24 来自手机 | 只看该作者
  2021-2-10 15:21
pe
wpeutil disablefirewall

winre.wimcmdwin10wimre.wim
回复

使用道具 举报

95#
发表于 2021-2-11 10:01:37 | 只看该作者
江南一根葱 发表于 2021-2-10 15:21
问下这种迷你pe是不是无法关闭防火墙
wpeutil disablefirewall报错,

早上找了一个win10原生的没做任何改动的winre.wim进cmd输入这个命令也报错,是不是win10原生的winre.wim不支持这个命令了?

点评

嗯,估计只能从install.wim搞出那些相关的dll了,不过7z貌似不能命令行解压原版包install.wim里面的文件,手工倒是可以提取,,好不科学,暂时只能手工, netsh add helper添加dll这种,应该可以补注册表解决的吧  详情 回复 发表于 2021-2-11 11:06
回复

使用道具 举报

96#
 楼主| 发表于 2021-2-11 11:06:54 | 只看该作者
sairen139 发表于 2021-2-11 10:01
早上找了一个win10原生的没做任何改动的winre.wim进cmd输入这个命令也报错,是不是win10原生的winre.wim ...

嗯,估计只能从install.wim搞出那些相关的dll了,不过7z貌似不能命令行解压原版包install.wim里面的文件,手工倒是可以提取,,好不科学,暂时只能手工,
netsh add helper添加dll这种,应该可以补注册表解决的吧

点评

wimlib就可以直接从install.wim里按列表提取想要的文件  详情 回复 发表于 2021-2-11 11:09
回复

使用道具 举报

97#
发表于 2021-2-11 11:09:16 | 只看该作者
江南一根葱 发表于 2021-2-11 11:06
嗯,估计只能从install.wim搞出那些相关的dll了,不过7z貌似不能命令行解压原版包install.wim里面的文件 ...

wimlib就可以直接从install.wim里按列表提取想要的文件

点评

如果是直接操作install.wim,用7z也是可以的,就是得从iso里解出来或挂载iso了。。 要是7z能直接操作iso里的install.wim就好了  详情 回复 发表于 2021-2-11 11:11
回复

使用道具 举报

98#
 楼主| 发表于 2021-2-11 11:11:49 | 只看该作者
sairen139 发表于 2021-2-11 11:09
wimlib就可以直接从install.wim里按列表提取想要的文件

如果是直接操作install.wim,用7z也是可以的,就是得从iso里解出来或挂载iso了。。
要是7z能直接操作iso里的install.wim就好了
回复

使用道具 举报

99#
发表于 2021-2-28 19:17:00 | 只看该作者
感谢葱大,基于Win10 1909 18363的BOOT.WIM制作的纯64位PE,任务管理器是英文的,其它界面则正常中文,是否还需要补充什么文件?

点评

这个偶不懂啊,要问发原帖的。。。  详情 回复 发表于 2021-3-1 19:43
回复

使用道具 举报

100#
 楼主| 发表于 2021-3-1 19:43:40 | 只看该作者
lps4290 发表于 2021-2-28 19:17
感谢葱大,基于Win10 1909 18363的BOOT.WIM制作的纯64位PE,任务管理器是英文的,其它界面则正常中文,是否 ...

这个偶不懂啊,要问发原帖的。。。
回复

使用道具 举报

101#
发表于 2021-3-1 19:47:23 | 只看该作者
非常感谢教程
回复

使用道具 举报

102#
 楼主| 发表于 2021-3-2 21:44:23 | 只看该作者
sairen139 发表于 2021-2-10 17:04
改成3手动而不是禁用可行吗?

上次那个防火墙的问题,
[HKEY_LOCAL_MACHINE\CurrentControlSet001\Services\mpssvc]
"Start"=dword:00000003
改成3可以了,
回复

使用道具 举报

103#
 楼主| 发表于 2021-3-2 21:44:33 | 只看该作者
sairen139 发表于 2021-2-10 17:04
改成3手动而不是禁用可行吗?

上次那个防火墙的问题,
[HKEY_LOCAL_MACHINE\CurrentControlSet001\Services\mpssvc]
"Start"=dword:00000003
改成3可以了,

点评

3是按需手动加载,那后续怎么搞呢?  详情 回复 发表于 2021-3-2 21:48
回复

使用道具 举报

104#
发表于 2021-3-2 21:48:56 | 只看该作者
江南一根葱 发表于 2021-3-2 21:44
上次那个防火墙的问题,
[HKEY_LOCAL_MACHINE\CurrentControlSet001\Services\mpssvc]
"Start"=dword:0 ...

3是按需手动加载,那后续怎么搞呢?

点评

我手工修复键值使用一直正常了, 如果要弄关了防火墙的一键制作批处理,是不是得从boot.wim里翔出注册表,挂载注册表单元,修改,卸载单元,再把注册表射回wim?  详情 回复 发表于 2021-3-5 17:44
回复

使用道具 举报

105#
发表于 2021-3-5 14:53:44 | 只看该作者
本帖最后由 lps4290 于 2021-3-5 14:54 编辑

回复错楼层,重新编辑
回复

使用道具 举报

106#
发表于 2021-3-5 14:56:10 | 只看该作者
sairen139 发表于 2020-12-14 14:58
这个是新版批处理的内容:

copy Winre.wim BOOT.WIM /y

老大,看过你早前一个帖子,是从卷2导出列表并且对卷2进行wimlib update,卷1无论是一开始删除还是最后删除,都没有用到。

但看了葱哥的批处理,用boot.wim制作,流程是先从卷1导出列表,然后删除卷1,最后按列表进行wimlib精简,即boot.wim卷2按卷1的列表进行精简,虽然最终也制作成功,但卷1和卷2文件列表毕竟不尽相同,@江南一根葱,两位老大觉得有没必要修改一下呢?

我这里修改了,判断是boot.wim后先删除卷1再执行后续,测试通过。顺便简化了一下语句,使得:
1、不用再生成1List.TXT、winsxsList.TXT两个临时列表,减少读写硬盘操作;
2、32位和64位脚本合并为一个,自动判断boot.wim或winre.wim位数。

虽然下面语句临时列表减少到只需要一个List.txt和excel.txt,但其实可以更简化,List.txt也不必生成,直接生成excel.txt,一步到位。以免混乱,下一层楼再发进一步简化版。


@echo off && cd /d %~dp0
if exist winre.wim (
echo 发现winre.wim!准备制作!
set wimfile=winre.wim
goto start
) else (
echo 没有发现winre.wim!尝试从boot.wim制作!
goto checkwim
)

:start
set /a startS=%time:~6,2%
set /a startM=%time:~3,2%
echo %time%
bin\wimlib dir %wimfile% 1 | find "." | findstr /vil "simsun.ttc ping.exe wpeinit.exe SortDefault 3ware.inf halmacpi.dll acpi.inf acpidev.inf acpipagr.inf acpitime.inf adp80xx.inf amdgpio2.inf amdi2c.inf amdsata.inf amdsbs.inf arcsas.inf basicdisplay.inf basicrender.inf battery.inf buttonconverter.inf c_apo.inf c_avc.inf c_battery.inf c_biometric.inf c_cdrom.inf c_computeaccelerator.inf c_computer.inf c_diskdrive.inf c_display.inf c_extension.inf c_firmware.inf c_hdc.inf c_hidclass.inf c_image.inf c_keyboard.inf c_legacydriver.inf c_mcx.inf c_media.inf c_mediumchanger.inf c_memory.inf c_modem.inf c_monitor.inf c_mouse.inf c_mtd.inf c_multifunction.inf c_multiportserial.inf c_net.inf c_netdriver.inf c_netservice.inf c_nettrans.inf c_ports.inf c_processor.inf c_proximity.inf c_sbp2.inf c_scmdisk.inf c_scmvolume.inf c_scsiadapter.inf c_sdhost.inf c_smartcard.inf c_smartcardfilter.inf c_smartcardreader.inf c_smrdisk.inf c_smrvolume.inf c_sslaccel.inf c_swcomponent.inf c_swdevice.inf c_system.inf c_ucm.inf c_unknown.inf c_usb.inf c_usbdevice.inf c_usbfn.inf c_volsnap.inf c_volume.inf c_wceusbs.inf dc21x4vm.inf disk.inf dwup.inf e2xw10x64.inf ehstortcgdrv.inf errata.inf errdev.inf genericusbfn.inf hal.inf halextintclpiodma.inf halextpl080.inf hdaudbus.inf hdaudio.inf hdaudss.inf hidbatt.inf hiddigi.inf hidi2c.inf hidinterrupt.inf hidserv.inf hidspi_km.inf hidvhf.inf hpsamd.inf iagpio.inf iai2c.inf iaLPSS2i_GPIO2_BXT_P.inf iaLPSS2i_GPIO2_CNL.inf iaLPSS2i_GPIO2_GLK.inf iaLPSS2i_GPIO2_SKL.inf iaLPSS2i_I2C_BXT_P.inf iaLPSS2i_I2C_CNL.inf iaLPSS2i_I2C_GLK.inf iaLPSS2i_I2C_SKL.inf ialpssi_gpio.inf ialpssi_i2c.inf iastorav.inf iastorv.inf input.inf ipmidrv.inf ipoib6x.inf iscsi.inf ItSas35i.inf kdnic.inf keyboard.inf lltdio.inf lsi_sas.inf lsi_sas2i.inf lsi_sas3i.inf lsi_sss.inf machine.inf mausbhost.inf mchgr.inf megasas.inf megasas2i.inf megasas35i.inf megasr.inf mf.inf mlx4_bus.inf mshdc.inf msmouse.inf msports.inf mssmbios.inf mtconfig.inf mvumis.inf ndisimplatform.inf ndisimplatformmp.inf ndisuio.inf ndisvirtualbus.inf net1ix64.inf net1yx64.inf net40i68.inf net44amd.inf net7400-x64-n650.inf net7500-x64-n650f.inf net7800-x64-n650f.inf net9500-x64-n650f.inf netax88179_178a.inf netax88772.inf nete1e3e.inf nete1g3e.inf netefe3e.inf netg664.inf netimm.inf netip6.inf netjme.inf netk57a.inf netl160a.inf netl1e64.inf netl260a.inf netloop.inf netmscli.inf netmyk64.inf netnb.inf netnvma.inf netnwifi.inf netrasa.inf netrass.inf netrast.inf netrtl64.inf netserv.inf netsstpa.inf nett4x64.inf nettcpip.inf netvf63a.inf netvg63a.inf netxex64.inf netxix64.inf npsvctrig.inf nvdimm.inf nvraid.inf pci.inf percsas2i.inf percsas3i.inf pmem.inf puwk.inf qd3x64.inf ramdisk.inf rawsilo.inf rdshup.inf rspndr.inf rt640x64.inf rtux64w10.inf sbp2.inf sceregvl.inf scmbus.inf scmvolume.inf scsidev.inf sdbus.inf sdstor.inf secrecs.inf sisraid2.inf sisraid4.inf SmartSAMD.inf smrdisk.inf smrvolume.inf spaceport.inf stexstor.inf stornvme.inf storufs.inf swenum.inf uaspstor.inf uefi.inf ufxchipidea.inf ufxsynopsys.inf umbus.inf umpass.inf unknown.inf usb.inf usbhub3.inf usbnet.inf usbport.inf usbser.inf usbstor.inf usbxhci.inf vdrvroot.inf vhdmp.inf virtdisk.inf volmgr.inf volsnap.inf volume.inf vsmraid.inf vstxraid.inf wdmaudiocoresystem.inf wdmvsc.inf whyperkbd.inf wmiacpi.inf wnetvsc.inf wstorflt.inf wstorvsc.inf wvmbus.inf wvmbushid.inf wvmbusvideo.inf ykinx64.inf L2Schemas aero.msstyles regedit aclui.dll advapi32.dll aepic.dll apisetschema.dll asycfilt.dll atl.dll authz.dll basesrv.dll bcd.dll bcdboot.exe bcdedit.exe bcryptprimitives.dll BFE.DLL BOOTVID.DLL BrokerLib.dll cabinet.dll cdd.dll cfgmgr32.dll ci.dll clb.dll cmd.exe cmdext.dll combase.dll comdlg32.dll coml2.dll conhost.exe console.dll credui.dll cryptbase.dll cryptdll.dll cryptsp.dll bcrypt.dll crypt32.dll cryptsvc.dll msxml ncrypt.dll rasapi32.dll wldp.dll csrsrv.dll csrss.exe C_1252.NLS C_437.NLS C_936.NLS d2d1.dll d3d11.dll dab.dll dabapi.dll dbgcore.dll dbghelp.dll devobj.dll devrtl.dll dhcpcore.dll dhcpcore6.dll dhcpcsvc.dll dhcpcsvc6.dll diskpart.exe dllhost.exe dnsapi.dll dnsrslvr.dll dpapi.dll dpapisrv.dll drvinst.exe drvload.exe drvsetup.dll drvstore.dll dsparse.dll dsrole.dll dui70.dll duser.dll dwmapi.dll DWrite.dll dxgi.dll eappprxy.dll EventAggregation.dll feclient.dll find.exe findstr.exe FirewallAPI.dll fltLib.dll fmifs.dll fontdrvhost.exe format.com fsutil.exe fsutilext.dll fveapi.dll fwbase.dll fwpolicyiomgr.dll FWPUCLNT.DLL gdi32.dll gdi32full.dll gpapi.dll hal.dll hhsetup.dll iertutil.dll ifsutil.dll IKEEXT.DLL imagehlp.dll imageres.dll imapi2.dll imm32.dll ipconfig.exe IPHLPAPI.DLL joinutil.dll KBDUS.DLL kd.dll KerbClientShared.dll kerberos.dll kernel.appcore.dll kernel32.dll KernelBase.dll keyiso.dll ksuser.dll ktmw32.dll l2nacp.dll linkinfo.dll lmhsvc.dll locale.nls logoncli.dll lsasrv.dll lsass.exe lsm.dll l_intl.nls mfc42u.dll mpr.dll MPSSVC.dll msasn1.dll msctf.dll msftedit.dll msimg32.dll msports.dll msprivs.dll msv1_0.dll msvcp110_win.dll msvcp_win.dll msvcrt.dll mswsock.dll ncsi.dll net.exe net1.exe netapi32.dll netbios.dll netcfgx.dll netjoin.dll netlogon.dll netmsg.dll netprovfw.dll NetSetupApi.dll NetSetupEngine.dll NetSetupSvc.dll netshell.dll netutils.dll newdev.dll ninput.dll nlaapi.dll nlasvc.dll normaliz.dll notepad.exe nrpsrv.dll nsi.dll nsisvc.dll ntasn1.dll ntdll.dll ntdsapi.dll ntlanman.dll NtlmShared.dll ntmarta.dll ntoskrnl.exe ole32.dll oleacc.dll oleaccrc.dll oleaut32.dll oledlg.dll OneCoreCommonProxyStub.dll onex.dll osuninst.dll powrprof.dll profapi.dll propsys.dll psapi.dll PSHED.DLL rasadhlp.dll rasman.dll reg.exe regsvr32.exe RpcEpMap.dll rpcrt4.dll RpcRtRemote.dll rpcss.dll rsaenh.dll rundll32.exe samcli.dll samsrv.dll schannel.dll schema.dat sechost.dll secur32.dll services.exe setupapi.dll SHCore.dll shell32.dll shlwapi.dll shutdownux.dll slc.dll SmiEngine.dll smss.exe spfileq.dll spinf.dll sppc.dll srvcli.dll srvsvc.dll sscore.dll sspicli.dll sspisrv.dll stdole2.tlb Storprop.dll svchost.exe sxs.dll sxssrv.dll sysclass.dll sysntfy.dll SystemEventsBrokerServer.dll takeown.exe taskmgr.exe TextShaping.dll ucrtbase.dll uexfat.dll ufat.dll ulib.dll umpdc.dll umpnpmgr.dll umpo.dll unattend.dll untfs.dll urlmon.dll user32.dll userenv.dll usp10.dll UXInit.dll uxtheme.dll vds.exe vdsbas.dll vdsdyn.dll vdsldr.exe vdsutil.dll vdsvd.dll vds_ps.dll version.dll virtdisk.dll webio.dll wevtapi.dll wevtsvc.dll wimgapi.dll wimserv.exe win32k.sys win32kbase.sys win32kfull.sys win32u.dll winbrand.dll Windows.FileExplorer.Common.dll windows.storage.dll CatRoot 2\drivers DriverStore WindowsCodecs.dll winhttp.dll wininet.dll wininit.exe wininitext.dll winlogon.exe winmm.dll winmmbase.dll winnlsres.dll winnsi.dll winpeshl winspool.drv winsrv.dll winsrvext.dll winsta.dll wintrust.dll WinTypes.dll wkscli.dll wkssvc.dll wlanapi.dll wlanhlp.dll wlanmsm.dll wlansec.dll wlansvc.dll wlanutil.dll Wldap32.dll wmiclnt.dll wpeutil ws2_32.dll wshhyperv.dll wsock32.dll wtsapi32.dll xcopy.exe xmllite.dll winload driver.stl winsxs">list.txt
bin\wimlib dir %wimfile% 1 --path=windows\winsxs | find "." | findstr /vi ".*_microsoft.windows.c..-controls.resources_.*_zh-cn .*_microsoft.windows.common-controls .*_microsoft.windows.gdiplus_.*_none Manifests.*_microsoft.windows.i..utomation.proxystub Manifests.*_microsoft.windows.isolationautomation Manifests.*_microsoft.windows.systemcompatible">>list.txt

echo.
echo 正在增删削减%wimfile%包里的文件制作pe过程中,请您稍微等待。。。
if exist excel.txt del excel.txt /f /q
for /f "delims=" %%i in (list.txt) do echo delete --force --recursive "%%i">>excel.txt
bin\wimlib dir %wimfile% 1 --path=Windows\SysWOW64 | find ".dll" >NUL && (set FD=x64) || (set FD=x86)
bin\wimlib update %wimfile%<excel.txt>NUL
bin\wimlib update %wimfile%<%FD%\add2wim.txt>NUL
bin\wimlib optimize %wimfile%

set /a endS=%time:~6,2%
set /a endM=%time:~3,2%
echo %time%
set /a diffS_=%endS%-%startS%
set /a diffM_=%endM%-%startM%
echo cost:%diffM_% %diffS_%
echo.
del /q *.txt
set output=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%wimfile%
ren %wimfile% %output%
echo 感谢您的等待,现在PE已经制作完成,%output%就是你的网络骨头版pe成品!

echo.
PAUSE

:checkwim
if exist boot.wim (
echo 发现boot.wim,直接制作,准备删除卷1……
bin\wimlib delete boot.wim 1 --check
set wimfile=boot.wim
goto:start
)
for /f %%i in ('dir /b %~dp0*.iso') do set iso=%%i
if "%iso%"=="" exit
echo 没有发现boot.wim,正在尝试从iso中解压出boot.wim....
bin\7z.exe e -o%~dp0 -aoa  %~dp0%iso% sources/boot.wim
set wimfile=boot.wim&&goto:start
回复

使用道具 举报

107#
发表于 2021-3-5 14:58:58 | 只看该作者
sairen139 发表于 2020-12-14 14:58
这个是新版批处理的内容:

copy Winre.wim BOOT.WIM /y

下面继续简化语句之后就一步生成excel.txt了,不知道两们老大有没测试过这种写法,
可惜虽然减少了临时文件的写入读取,但速度却更慢了,不得不吐槽for命令的低效。
不过我还是喜欢这种简洁的写法,改成这样自用了,慢一些就慢一些吧,也不差这点时间。


@echo off && cd /d %~dp0
if exist winre.wim (
echo 发现winre.wim!准备制作!
set wimfile=winre.wim
goto start
) else (
echo 没有发现winre.wim!尝试从boot.wim制作!
goto checkwim
)

:start
set /a startS=%time:~6,2%
set /a startM=%time:~3,2%
echo %time%
if exist excel.txt del excel.txt /f /q
for /f "delims=" %%i in ('bin\wimlib dir %wimfile% 1 ^| find "." ^| findstr /vil "simsun.ttc ping.exe wpeinit.exe SortDefault 3ware.inf halmacpi.dll acpi.inf acpidev.inf acpipagr.inf acpitime.inf adp80xx.inf amdgpio2.inf amdi2c.inf amdsata.inf amdsbs.inf arcsas.inf basicdisplay.inf basicrender.inf battery.inf buttonconverter.inf c_apo.inf c_avc.inf c_battery.inf c_biometric.inf c_cdrom.inf c_computeaccelerator.inf c_computer.inf c_diskdrive.inf c_display.inf c_extension.inf c_firmware.inf c_hdc.inf c_hidclass.inf c_image.inf c_keyboard.inf c_legacydriver.inf c_mcx.inf c_media.inf c_mediumchanger.inf c_memory.inf c_modem.inf c_monitor.inf c_mouse.inf c_mtd.inf c_multifunction.inf c_multiportserial.inf c_net.inf c_netdriver.inf c_netservice.inf c_nettrans.inf c_ports.inf c_processor.inf c_proximity.inf c_sbp2.inf c_scmdisk.inf c_scmvolume.inf c_scsiadapter.inf c_sdhost.inf c_smartcard.inf c_smartcardfilter.inf c_smartcardreader.inf c_smrdisk.inf c_smrvolume.inf c_sslaccel.inf c_swcomponent.inf c_swdevice.inf c_system.inf c_ucm.inf c_unknown.inf c_usb.inf c_usbdevice.inf c_usbfn.inf c_volsnap.inf c_volume.inf c_wceusbs.inf dc21x4vm.inf disk.inf dwup.inf e2xw10x64.inf ehstortcgdrv.inf errata.inf errdev.inf genericusbfn.inf hal.inf halextintclpiodma.inf halextpl080.inf hdaudbus.inf hdaudio.inf hdaudss.inf hidbatt.inf hiddigi.inf hidi2c.inf hidinterrupt.inf hidserv.inf hidspi_km.inf hidvhf.inf hpsamd.inf iagpio.inf iai2c.inf iaLPSS2i_GPIO2_BXT_P.inf iaLPSS2i_GPIO2_CNL.inf iaLPSS2i_GPIO2_GLK.inf iaLPSS2i_GPIO2_SKL.inf iaLPSS2i_I2C_BXT_P.inf iaLPSS2i_I2C_CNL.inf iaLPSS2i_I2C_GLK.inf iaLPSS2i_I2C_SKL.inf ialpssi_gpio.inf ialpssi_i2c.inf iastorav.inf iastorv.inf input.inf ipmidrv.inf ipoib6x.inf iscsi.inf ItSas35i.inf kdnic.inf keyboard.inf lltdio.inf lsi_sas.inf lsi_sas2i.inf lsi_sas3i.inf lsi_sss.inf machine.inf mausbhost.inf mchgr.inf megasas.inf megasas2i.inf megasas35i.inf megasr.inf mf.inf mlx4_bus.inf mshdc.inf msmouse.inf msports.inf mssmbios.inf mtconfig.inf mvumis.inf ndisimplatform.inf ndisimplatformmp.inf ndisuio.inf ndisvirtualbus.inf net1ix64.inf net1yx64.inf net40i68.inf net44amd.inf net7400-x64-n650.inf net7500-x64-n650f.inf net7800-x64-n650f.inf net9500-x64-n650f.inf netax88179_178a.inf netax88772.inf nete1e3e.inf nete1g3e.inf netefe3e.inf netg664.inf netimm.inf netip6.inf netjme.inf netk57a.inf netl160a.inf netl1e64.inf netl260a.inf netloop.inf netmscli.inf netmyk64.inf netnb.inf netnvma.inf netnwifi.inf netrasa.inf netrass.inf netrast.inf netrtl64.inf netserv.inf netsstpa.inf nett4x64.inf nettcpip.inf netvf63a.inf netvg63a.inf netxex64.inf netxix64.inf npsvctrig.inf nvdimm.inf nvraid.inf pci.inf percsas2i.inf percsas3i.inf pmem.inf puwk.inf qd3x64.inf ramdisk.inf rawsilo.inf rdshup.inf rspndr.inf rt640x64.inf rtux64w10.inf sbp2.inf sceregvl.inf scmbus.inf scmvolume.inf scsidev.inf sdbus.inf sdstor.inf secrecs.inf sisraid2.inf sisraid4.inf SmartSAMD.inf smrdisk.inf smrvolume.inf spaceport.inf stexstor.inf stornvme.inf storufs.inf swenum.inf uaspstor.inf uefi.inf ufxchipidea.inf ufxsynopsys.inf umbus.inf umpass.inf unknown.inf usb.inf usbhub3.inf usbnet.inf usbport.inf usbser.inf usbstor.inf usbxhci.inf vdrvroot.inf vhdmp.inf virtdisk.inf volmgr.inf volsnap.inf volume.inf vsmraid.inf vstxraid.inf wdmaudiocoresystem.inf wdmvsc.inf whyperkbd.inf wmiacpi.inf wnetvsc.inf wstorflt.inf wstorvsc.inf wvmbus.inf wvmbushid.inf wvmbusvideo.inf ykinx64.inf L2Schemas aero.msstyles regedit aclui.dll advapi32.dll aepic.dll apisetschema.dll asycfilt.dll atl.dll authz.dll basesrv.dll bcd.dll bcdboot.exe bcdedit.exe bcryptprimitives.dll BFE.DLL BOOTVID.DLL BrokerLib.dll cabinet.dll cdd.dll cfgmgr32.dll ci.dll clb.dll cmd.exe cmdext.dll combase.dll comdlg32.dll coml2.dll conhost.exe console.dll credui.dll cryptbase.dll cryptdll.dll cryptsp.dll bcrypt.dll crypt32.dll cryptsvc.dll msxml ncrypt.dll rasapi32.dll wldp.dll csrsrv.dll csrss.exe C_1252.NLS C_437.NLS C_936.NLS d2d1.dll d3d11.dll dab.dll dabapi.dll dbgcore.dll dbghelp.dll devobj.dll devrtl.dll dhcpcore.dll dhcpcore6.dll dhcpcsvc.dll dhcpcsvc6.dll diskpart.exe dllhost.exe dnsapi.dll dnsrslvr.dll dpapi.dll dpapisrv.dll drvinst.exe drvload.exe drvsetup.dll drvstore.dll dsparse.dll dsrole.dll dui70.dll duser.dll dwmapi.dll DWrite.dll dxgi.dll eappprxy.dll EventAggregation.dll feclient.dll find.exe findstr.exe FirewallAPI.dll fltLib.dll fmifs.dll fontdrvhost.exe format.com fsutil.exe fsutilext.dll fveapi.dll fwbase.dll fwpolicyiomgr.dll FWPUCLNT.DLL gdi32.dll gdi32full.dll gpapi.dll hal.dll hhsetup.dll iertutil.dll ifsutil.dll IKEEXT.DLL imagehlp.dll imageres.dll imapi2.dll imm32.dll ipconfig.exe IPHLPAPI.DLL joinutil.dll KBDUS.DLL kd.dll KerbClientShared.dll kerberos.dll kernel.appcore.dll kernel32.dll KernelBase.dll keyiso.dll ksuser.dll ktmw32.dll l2nacp.dll linkinfo.dll lmhsvc.dll locale.nls logoncli.dll lsasrv.dll lsass.exe lsm.dll l_intl.nls mfc42u.dll mpr.dll MPSSVC.dll msasn1.dll msctf.dll msftedit.dll msimg32.dll msports.dll msprivs.dll msv1_0.dll msvcp110_win.dll msvcp_win.dll msvcrt.dll mswsock.dll ncsi.dll net.exe net1.exe netapi32.dll netbios.dll netcfgx.dll netjoin.dll netlogon.dll netmsg.dll netprovfw.dll NetSetupApi.dll NetSetupEngine.dll NetSetupSvc.dll netshell.dll netutils.dll newdev.dll ninput.dll nlaapi.dll nlasvc.dll normaliz.dll notepad.exe nrpsrv.dll nsi.dll nsisvc.dll ntasn1.dll ntdll.dll ntdsapi.dll ntlanman.dll NtlmShared.dll ntmarta.dll ntoskrnl.exe ole32.dll oleacc.dll oleaccrc.dll oleaut32.dll oledlg.dll OneCoreCommonProxyStub.dll onex.dll osuninst.dll powrprof.dll profapi.dll propsys.dll psapi.dll PSHED.DLL rasadhlp.dll rasman.dll reg.exe regsvr32.exe RpcEpMap.dll rpcrt4.dll RpcRtRemote.dll rpcss.dll rsaenh.dll rundll32.exe samcli.dll samsrv.dll schannel.dll schema.dat sechost.dll secur32.dll services.exe setupapi.dll SHCore.dll shell32.dll shlwapi.dll shutdownux.dll slc.dll SmiEngine.dll smss.exe spfileq.dll spinf.dll sppc.dll srvcli.dll srvsvc.dll sscore.dll sspicli.dll sspisrv.dll stdole2.tlb Storprop.dll svchost.exe sxs.dll sxssrv.dll sysclass.dll sysntfy.dll SystemEventsBrokerServer.dll takeown.exe taskmgr.exe TextShaping.dll ucrtbase.dll uexfat.dll ufat.dll ulib.dll umpdc.dll umpnpmgr.dll umpo.dll unattend.dll untfs.dll urlmon.dll user32.dll userenv.dll usp10.dll UXInit.dll uxtheme.dll vds.exe vdsbas.dll vdsdyn.dll vdsldr.exe vdsutil.dll vdsvd.dll vds_ps.dll version.dll virtdisk.dll webio.dll wevtapi.dll wevtsvc.dll wimgapi.dll wimserv.exe win32k.sys win32kbase.sys win32kfull.sys win32u.dll winbrand.dll Windows.FileExplorer.Common.dll windows.storage.dll CatRoot 2\drivers DriverStore WindowsCodecs.dll winhttp.dll wininet.dll wininit.exe wininitext.dll winlogon.exe winmm.dll winmmbase.dll winnlsres.dll winnsi.dll winpeshl winspool.drv winsrv.dll winsrvext.dll winsta.dll wintrust.dll WinTypes.dll wkscli.dll wkssvc.dll wlanapi.dll wlanhlp.dll wlanmsm.dll wlansec.dll wlansvc.dll wlanutil.dll Wldap32.dll wmiclnt.dll wpeutil ws2_32.dll wshhyperv.dll wsock32.dll wtsapi32.dll xcopy.exe xmllite.dll winload driver.stl winsxs"') do echo delete --force --recursive "%%i">>excel.txt
for /f "delims=" %%i in ('bin\wimlib dir %wimfile% 1 --path=windows\winsxs ^| find "." ^| findstr /vi ".*_microsoft.windows.c..-controls.resources_.*_zh-cn .*_microsoft.windows.common-controls .*_microsoft.windows.gdiplus_.*_none Manifests.*_microsoft.windows.i..utomation.proxystub Manifests.*_microsoft.windows.isolationautomation Manifests.*_microsoft.windows.systemcompatible"') do echo delete --force --recursive "%%i">>excel.txt

echo.
echo 正在增删削减%wimfile%包里的文件制作pe过程中,请您稍微等待。。。
bin\wimlib dir %wimfile% 1 --path=Windows\SysWOW64 | find ".dll" >NUL && (set FD=x64) || (set FD=x86)
bin\wimlib update %wimfile%<excel.txt>NUL
bin\wimlib update %wimfile%<%FD%\add2wim.txt>NUL
bin\wimlib optimize %wimfile%

set /a endS=%time:~6,2%
set /a endM=%time:~3,2%
echo %time%
set /a diffS_=%endS%-%startS%
set /a diffM_=%endM%-%startM%
echo cost:%diffM_% %diffS_%
echo.
del /q *.txt
set output=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%wimfile%
ren %wimfile% %output%
echo 感谢您的等待,现在PE已经制作完成,%output%就是你的网络骨头版pe成品!

echo.
PAUSE

:checkwim
if exist boot.wim (
echo 发现boot.wim,直接制作,准备删除卷1……
bin\wimlib delete boot.wim 1 --check
set wimfile=boot.wim
goto:start
)
for /f %%i in ('dir /b %~dp0*.iso') do set iso=%%i
if "%iso%"=="" exit
echo 没有发现boot.wim,正在尝试从iso中解压出boot.wim....
bin\7z.exe e -o%~dp0 -aoa  %~dp0%iso% sources/boot.wim
set wimfile=boot.wim&&goto:start
回复

使用道具 举报

108#
发表于 2021-3-5 15:44:34 | 只看该作者
lps4290 发表于 2021-3-5 14:58
下面继续简化语句之后就一步生成excel.txt了,不知道两们老大有没测试过这种写法,
可惜虽然减少了临时 ...

如果觉得for慢,可以引进sed.exe,这个第三方的sed.exe可以一次性添加delete —force —recursive这个操作瞬间完成,缩短很多时间。

点评

好的,找时间试试。 另外,刚刚在语句列表中发现一个 2\drivers ,应该是手误吧?  详情 回复 发表于 2021-3-5 19:14
回复

使用道具 举报

109#
 楼主| 发表于 2021-3-5 17:44:09 | 只看该作者
sairen139 发表于 2021-3-2 21:48
3是按需手动加载,那后续怎么搞呢?

我手工修复键值使用一直正常了,
如果要弄关了防火墙的一键制作批处理,是不是得从boot.wim里翔出注册表,挂载注册表单元,修改,卸载单元,再把注册表射回wim?

点评

你手工改动这个键值是在进pe桌面之前就改的吗?进pe桌面之后改行不行?  详情 回复 发表于 2021-3-5 18:03
回复

使用道具 举报

110#
 楼主| 发表于 2021-3-5 17:45:27 | 只看该作者
lps4290 发表于 2021-3-5 14:58
下面继续简化语句之后就一步生成excel.txt了,不知道两们老大有没测试过这种写法,
可惜虽然减少了临时 ...

我倒想把for后面的那一堆东西弄到一个txt里,比如win10x86_64.txt ,其它系统就搞个win7x86_64.txt
现在这样看着非常蛋疼,不知道有没有办法实现

点评

当然可以。win10x86_64.txt 看附件。主要是那两大段换成FOR,其余语句不变 :start set /a startS=%time:~6,2% set /a startM=%time:~3,2%echo %time% for /f "delims=" %%i in (bin\win10x86_64.txt) do ( e  详情 回复 发表于 2021-3-5 18:58
回复

使用道具 举报

111#
发表于 2021-3-5 18:03:59 | 只看该作者
江南一根葱 发表于 2021-3-5 17:44
我手工修复键值使用一直正常了,
如果要弄关了防火墙的一键制作批处理,是不是得从boot.wim里翔出注册表 ...

你手工改动这个键值是在进pe桌面之前就改的吗?进pe桌面之后改行不行?
回复

使用道具 举报

112#
发表于 2021-3-5 18:58:25 | 只看该作者
本帖最后由 lps4290 于 2021-3-5 19:18 编辑
江南一根葱 发表于 2021-3-5 17:45
我倒想把for后面的那一堆东西弄到一个txt里,比如win10x86_64.txt ,其它系统就搞个win7x86_64.txt
现在 ...

当然可以。win10x86_64.txt 格式看附件。主要是那两大段换成一个FOR,其余语句不变,耗时几乎不变。下面语句中win10x86_64.txt路径按你实际放置位置改。

win10x86_64.txt (7.05 KB, 下载次数: 11)

:start
set /a startS=%time:~6,2%
set /a startM=%time:~3,2%
echo %time%
for /f "delims=" %%i in (bin\win10x86_64.txt) do (
        echo %%i | find ".exe" >NUL && (
        bin\wimlib dir %wimfile% 1 | find "." | findstr /vil "%%i">>List.txt
        ) || (
        bin\wimlib dir %wimfile% 1 --path=windows\winsxs | find "." | findstr /vi "%%i">>List.txt
        )
)
echo.
echo 正在增删削减%wimfile%包里的文件制作pe过程中,请您稍微等待。。。
if exist excel.txt del excel.txt /f /q
for /f "delims=" %%i in (List.txt) do echo delete --force --recursive "%%i">>excel.txt
bin\wimlib dir %wimfile% 1 --path=Windows\SysWOW64 | find ".exe" >NUL && (set FD=x64) || (set FD=x86)
bin\wimlib update %wimfile%<excel.txt>NUL
bin\wimlib update %wimfile%<%FD%\add2wim.txt>NUL
bin\wimlib optimize %wimfile%







点评

这个好像会跑一大堆的 echo delete --force --recursive " 会比较耗时间,echo off的话貌似会不成功,  详情 回复 发表于 2021-3-5 20:51
用第三方sed.exe来替换掉for语句速度将大大加快,三秒制作完成pe,十几秒制作完成一个精简系统都不成问题!  详情 回复 发表于 2021-3-5 19:12
这样简洁,改一改可以用来精简install.wim制作精简系统了  详情 回复 发表于 2021-3-5 19:06
回复

使用道具 举报

113#
发表于 2021-3-5 19:06:30 | 只看该作者
lps4290 发表于 2021-3-5 18:58
当然可以。win10x86_64.txt 格式看附件。主要是那两大段换成一个FOR,其余语句不变,耗时几乎不变。下面 ...

这样简洁,改一改可以用来精简install.wim制作精简系统了
回复

使用道具 举报

114#
发表于 2021-3-5 19:06:34 | 只看该作者
lps4290 发表于 2021-3-5 18:58
当然可以。win10x86_64.txt 格式看附件。主要是那两大段换成一个FOR,其余语句不变,耗时几乎不变。下面 ...

这样简洁,改一改可以用来精简install.wim制作精简系统了
回复

使用道具 举报

115#
发表于 2021-3-5 19:12:54 | 只看该作者
lps4290 发表于 2021-3-5 18:58
当然可以。win10x86_64.txt 格式看附件。主要是那两大段换成一个FOR,其余语句不变,耗时几乎不变。下面 ...

用第三方sed.exe来替换掉for语句速度将大大加快,三秒制作完成pe,十几秒制作完成一个精简系统都不成问题!
回复

使用道具 举报

116#
发表于 2021-3-5 19:14:25 | 只看该作者
sairen139 发表于 2021-3-5 15:44
如果觉得for慢,可以引进sed.exe,这个第三方的sed.exe可以一次性添加delete —force —recursive这个操 ...

好的,找时间试试。

另外,刚刚在语句列表中发现一个 2\drivers ,应该是手误吧?

点评

不是手误,早期的批处理里查找drivers会连带查找driverstore,所以加了2\,后期的批处理没有这个问题了  详情 回复 发表于 2021-3-5 19:17
回复

使用道具 举报

117#
发表于 2021-3-5 19:17:36 | 只看该作者
lps4290 发表于 2021-3-5 19:14
好的,找时间试试。

另外,刚刚在语句列表中发现一个 2\drivers ,应该是手误吧?

不是手误,早期的批处理里查找drivers会连带查找driverstore,所以加了2\,后期的批处理没有这个问题了
回复

使用道具 举报

118#
 楼主| 发表于 2021-3-5 20:51:05 | 只看该作者
本帖最后由 江南一根葱 于 2021-3-5 21:07 编辑
lps4290 发表于 2021-3-5 18:58
当然可以。win10x86_64.txt 格式看附件。主要是那两大段换成一个FOR,其余语句不变,耗时几乎不变。下面 ...

这个好像会跑一大堆的
echo delete --force --recursive " 会比较耗时间,echo off的话貌似会不成功,---------------------------------------------------------------
上面的问题解决了,还是这个结构比较好修改,之前一直没时间研究
不知道有没有办法对install.wim作类似的操作

点评

用第三方sed.exe跑这个很快,可以省掉for语句的时间  详情 回复 发表于 2021-3-5 22:33
回复

使用道具 举报

119#
 楼主| 发表于 2021-3-5 21:37:52 | 只看该作者
多谢各位一起折腾,我目前就差制作完的pe默认关闭防火墙这个了,
[HKEY_LOCAL_MACHINE\CurrentControlSet001\Services\mpssvc]
"Start"=dword:00000003
回复

使用道具 举报

120#
发表于 2021-3-5 22:33:55 | 只看该作者
江南一根葱 发表于 2021-3-5 20:51
这个好像会跑一大堆的
echo delete --force --recursive " 会比较耗时间,echo off的话貌似会不成功,-- ...

用第三方sed.exe跑这个很快,可以省掉for语句的时间

点评

我109楼的语句并不是用FOR直接一步生成excel.txt,所以总耗时并没有明显增加,不用sed.exe问题也不大。多了一个FOR仅用来读取 一次win10x86_64.txt(实际只有两行),取两次值这个FOR就完成任务了,其余流程差别不  详情 回复 发表于 2021-3-6 10:09
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-27 02:48

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表