Win10打印功能(组件)恢复(修复)
一、 注册表
1、控制及类
pe-sys\ControlSet001\Control\Print
pe-sys\ControlSet001\Control\Class\{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}
pe-sys\ControlSet001\Control\Class\{4658ee7e-f050-11d1-b6bd-00c04fa372a7}
pe-sys\ControlSet001\Control\Class\{49ce6ac8-6f86-11d2-b1e5-0080c72e74a2}
pe-sys\ControlSet001\Control\Class\{4d36e979-e325-11ce-bfc1-08002be10318}
pe-sys\ControlSet001\Control\Class\{c30ecea0-11ef-4ef9-b02e-6af81e6e65c0}
pe-sys\ControlSet001\Control\Class\{c7bc9b22-21f0-4f0d-9bb6-66c229b8cd33}
2、服务
pe-sys\ControlSet001\Services\Spooler
pe-sys\ControlSet001\Services\usbprint(注意,如果组件外置,这一项不要,系统注册表中有的话也要删除)
3、usbprint.inf安装包数据库记录(这一步不是必须)
用RegWorkshop在pe-sys\DriverDatabase位置查找usbprint.inf再导出备用
以上三项均从INSTALL.WIM的SYSTEM中提取。
二、 文件列表
可以分成三部分
1、 设备与打印机
Windows
│ splwow64.exe
│
├─inf
│ c_pnpprinters.inf
│ c_printer.inf
│ PrintQueue.inf
│ printupg.inf
│ usbprint.inf
│
├─PrintDialog(注:整个目录,但似乎没什么用)
│
└─System32
│ AppMon.dll
│ bidispl.dll
│ compstui.dll
│ DafPrintProvider.dll
│ defaultdevicemanager.dll
│ defaultprinterprovider.dll
│ DevDispItemProvider.dll
│ DeveloperOptionsSettingsHandlers.dll
│ deviceassociation.dll
│ DeviceCenter.dll
│ DeviceDisplayStatusManager.dll
│ DeviceDriverRetrievalClient.dll
│ DeviceEject.exe
│ DeviceElementSource.dll
│ DeviceEnroller.exe
│ DeviceMetadataRetrievalClient.dll
│ DevicePairing.dll
│ DevicePairingFolder.dll
│ DevicePairingProxy.dll
│ DevicePairingWizard.exe
│ deviceregistration.dll
│ DeviceSetupManager.dll
│ DeviceSetupManagerAPI.dll
│ DeviceSetupStatusProvider.dll
│ DevicesFlowBroker.dll
│ DeviceUxRes.dll
│ devinv.dll
│ DevPropMgr.dll
│ DevQueryBroker.dll
│ efswrt.dll
│ FaxPrinterInstaller.dll
│ FdDevQuery.dll
│ fdPnp.dll
│ fdprint.dll
│ fdWNet.dll
│ fdWSD.dll
│ findnetprinters.dll
│ fundisc.dll
│ fxsapi.dll
│ FXSMON.dll
│ FXSRESM.dll
│ gpprnext.dll
│ hgprint.dll
│ icm32.dll
│ icmui.dll
│ inetpp.dll
│ inetppui.dll
│ IPPMon.dll
│ localspl.dll
│ localui.dll
│ mgmtapi.dll
│ newdev.exe
│ ntprint.dll
│ ntprint.exe
│ OpcServices.dll
│ pcl.sep
│ print.exe
│ PrintBrmUi.exe
│ PrintDialogHost.exe
│ PrintDialogs.dll
│ printfilterpipelineprxy.dll
│ printfilterpipelinesvc.exe
│ PrintIsolationHost.exe
│ PrintIsolationProxy.dll
│ printmanagement.msc
│ PrintPlatformConfig.dll
│ PrintRenderAPIHost.DLL
│ printui.dll
│ printui.exe
│ PrintWSDAHost.dll
│ prncache.dll
│ prnfldr.dll
│ prnntfy.dll
│ prntvpt.dll
│ pscript.sep
│ puiapi.dll
│ puiobj.dll
│ rasadhlp.dll
│ RepCurUser.cmd
│ ReSpooler.cmd
│ serialui.dll
│ spoolss.dll
│ spoolsv.exe
│ srclient.dll
│ srcore.dll
│ sysprint.sep
│ sysprtj.sep
│ tcpmon.ini
│ umb.dll
│ usbmon.dll
│ webservices.dll
│ win32spl.dll
│ Windows.Devices.Printers.dll
│ Windows.Devices.Printers.Extensions.dll
│ Windows.Graphics.dll
│ Windows.Graphics.Printing.3D.dll
│ Windows.Graphics.Printing.dll
│ Windows.Internal.Shell.Broker.dll
│ WLIDNSP.DLL
│ WlS0WndH.dll
│ WSDApi.dll
│ WSDMon.dll(1903没有了)
│ wsdprintproxy.dll
│ WSDScanProxy.dll
│ XpsDocumentTargetPrint.dll
│ XpsFilt.dll
│ XpsGdiConverter.dll
│ XpsPrint.dll
│ XpsRasterService.dll
│ XPSServiceS.DLL
│ XPSSHHDR.dll
│ xwizard.exe
│ xwizards.dll
│ xwtpdui.dll
│ xwtpw32.dll
│
├─CatRoot
│ └─{F750E6C3-38EE-11D1-85E5-00C04FC295EE}(注:含Print字符的cat文件,其中~zh-cn类型的都可以不要)
│
├─drivers
│ usbprint.sys
│
├─driverstore
│ ├─en-US
│ │ c_dot4print.inf_loc
│ │ c_pnpprinters.inf_loc
│ │ c_printer.inf_loc
│ │ c_receiptprinter.inf_loc
│ │
│ ├─FileRepository
│ │ ├─c_dot4print.inf_x86_3a482d7106e67af5
│ │ │ c_dot4print.inf
│ │ │
│ │ ├─c_pnpprinters.inf_x86_332e93a45a3e656a
│ │ │ c_pnpprinters.inf
│ │ │
│ │ ├─c_printer.inf_x86_e6ba9e11e6380557
│ │ │ c_printer.inf
│ │ │
│ │ ├─c_receiptprinter.inf_x86_f0322e57fec0dc81
│ │ │ c_receiptprinter.inf
│ │ │
│ │ ├─printqueue.inf_x86_5599cddb064d37cf
│ │ │ printqueue.inf
│ │ │
│ │ └─usbprint.inf_x86_08d44a3fd742371d
│ │ usbprint.inf
│ │ usbprint.sys
│ │
│ └─zh-CN
│ bthprint.inf_loc
│ PrintQueue.inf_loc
│ usbprint.inf_loc
│
├─spool(整个目录)
│
└─zh-CN(下面对应的文件)
2、 基本驱动
Windows
├─INF
│ ntprint.inf
│ ntprint4.inf
│ tsprint.inf
│ wsdprint.inf
│
└─System32
├─catroot
│ └─{F750E6C3-38EE-11D1-85E5-00C04FC295EE}
│ ntprint.cat
│ ntprint4.cat
│
└─DriverStore
├─en-US
│ ntprint4.inf_loc
├─FileRepository
│ ├─ntprint.inf_x86_ab738c05d09b470b
│ ├─ntprint4.inf_x86_9d6305e59342bba1
│ ├─tsprint.inf_x86_af7e87be969e4e2c
│ └─wsdprint.inf_x86_69b253d182b5dd8c
└─zh-CN
ntprint.inf_loc
tsprint.inf_loc
WSDPrint.inf_loc
3、 系统集成的驱动
Windows
└─System32
├─CatRoot
│ └─{F750E6C3-38EE-11D1-85E5-00C04FC295EE}中PRN开头的数据
└─DriverStore
└─FileRepository下以PRN开头的目录
三、 处理
1、 注册表导入
把上述三项注册表导入PE的system中。
2、 spoolsv.exe的破解
因为HKEY_LOCAL_MACHINE\SYSTEM\Setup\SystemSetupInProgress=0打印才能开启,但影响装显卡等其他驱动。用二进制编辑器打开spoolsv.exe,搜索Unicode编码SystemSetupInProgress,这个串随便改动其中的任何一个字母就行。(18362似乎找不到也不需要破解)
也可以用PECMD的命令PUTF %Windir%\System32\spoolsv.exe,0x2D0C,0x54来修改的一个字母,其中偏移位置先找出来。
3、 安装的核心命令:
解压上述文件到系统中
ntprint.exe
net start spooler
PnPutil.exe -i -a "%Windir%\inf\usbprint.inf”
注意,如果数据库中没登记,可以直接PECMD脚本安装:FORX @%Windir%\System32\DriverStore\FileRepository\usbprint.inf*,inf,1,exec =*drvload.exe "%inf%\usbprint.inf"
如果你的打印机系统中已经集成,则可以直接使用了,如果没有可以自备驱动到设备管理中安装,或者可以安装网络共享的打印机,因为组件已经安装好了。
以上文件列表及方法以Win10 1709 16299为蓝本。近期看1803 18362去掉了好多系统自带驱动,如我的HPM1005一体机就没有自带驱动了。
按上述的列表和注册表信息,转成WimBuilder2的批处理,
Z:\WimBuilder2\Projects\WIN10XPE\01-Components\Printer\main.bat
代码如下:
rem ==========update filesystem==========
set AddFiles_Mode=merge
;devices and printers
call AddDrivers "c_pnpprinters.inf,c_printer.inf,PrintQueue.inf,printupg.inf,usbprint.inf"
;base drivers
call AddDrivers "ntprint4.inf,ntprint.inf,ntprint4.inf,tsprint.inf,wsdprint.inf"
call AddFiles %0 :end_files
goto :end_files
\Windows\splwow64.exe
\Windows\PrintDialog
\Windows\System32\drivers\usbprint.sys
@\Windows\System32\driverstore\en-US
;devices and printers
c_dot4print.inf_loc
c_pnpprinters.inf_loc
c_printer.inf_loc
c_receiptprinter.inf_loc
;base drivers
ntprint4.inf_loc
@\Windows\System32\driverstore\%WB_PE_LANG%
;devices and printers
bthprint.inf_loc
PrintQueue.inf_loc
usbprint.inf_loc
;base drivers
ntprint.inf_loc
tsprint.inf_loc
WSDPrint.inf_loc
@\Windows\System32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\
*Print*
ntprint.cat
ntprint4.cat
prn*.cat
@\Windows\System32\DriverStore\FileRepository\prn*.inf*
@\Windows\System32\
AppMon.dll,bidispl.dll,compstui.dll,DafPrintProvider.dll,defaultdevicemanager.dll,defaultprinterprovider.dll
DevDispItemProvider.dll,DeveloperOptionsSettingsHandlers.dll,deviceassociation.dll
DeviceCenter.dll,DeviceDisplayStatusManager.dll,DeviceDriverRetrievalClient.dll
DeviceEject.exe,DeviceElementSource.dll,DeviceEnroller.exe,DeviceMetadataRetrievalClient.dll
DevicePairing.dll,DevicePairingFolder.dll,DevicePairingProxy.dll,DevicePairingWizard.exe
deviceregistration.dll,DeviceSetupManager.dll,DeviceSetupManagerAPI.dll,DeviceSetupStatusProvider.dll
DevicesFlowBroker.dll,DeviceUxRes.dll,devinv.dll,DevPropMgr.dll,DevQueryBroker.dll,efswrt.dll
FaxPrinterInstaller.dll,FdDevQuery.dll,fdPnp.dll,fdprint.dll,fdWNet.dll,fdWSD.dll,findnetprinters.dll
fundisc.dll,fxsapi.dll,FXSMON.dll,FXSRESM.dll,gpprnext.dll,hgprint.dll,icm32.dll,icmui.dll
inetpp.dll,inetppui.dll,IPPMon.dll,localspl.dll,localui.dll,mgmtapi.dll
newdev.exe,ntprint.dll,ntprint.exe,OpcServices.dll,pcl.sep,print.exe
PrintBrmUi.exe,PrintDialogHost.exe,PrintDialogs.dll,printfilterpipelineprxy.dll,printfilterpipelinesvc.exe
PrintIsolationHost.exe,PrintIsolationProxy.dll,printmanagement.msc,PrintPlatformConfig.dll,PrintRenderAPIHost.DLL
printui.dll,printui.exe,PrintWSDAHost.dll,prncache.dll,prnfldr.dll,prnntfy.dll,prntvpt.dll,pscript.sep
puiapi.dll,puiobj.dll,rasadhlp.dll,RepCurUser.cmd,ReSpooler.cmd,serialui.dll,spoolss.dll,spoolsv.exe,srclient.dll
srcore.dll,sysprint.sep,sysprtj.sep,tcpmon.ini,umb.dll,usbmon.dll,webservices.dll,win32spl.dll
Windows.Devices.Printers.dll,Windows.Devices.Printers.Extensions.dll
Windows.Graphics.dll,Windows.Graphics.Printing.3D.dll,Windows.Graphics.Printing.dll
Windows.Internal.Shell.Broker.dll,WLIDNSP.DLL,WlS0WndH.dll,WSDApi.dll,WSDMon.dll,wsdprintproxy.dll,WSDScanProxy.dll
XpsDocumentTargetPrint.dll,XpsFilt.dll,XpsGdiConverter.dll,XpsPrint.dll,XpsRasterService.dll,XPSServiceS.DLL,XPSSHHDR.dll
xwizard.exe,xwizards.dll,xwtpdui.dll,xwtpw32.dll
:end_files
call DoAddFiles
rem ==========update registry==========
call RegCopy SYSTEM\ControlSet001\Control\Print
call RegCopy SYSTEM\ControlSet001\Control\Class\{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}
call RegCopy SYSTEM\ControlSet001\Control\Class\{4658ee7e-f050-11d1-b6bd-00c04fa372a7}
call RegCopy SYSTEM\ControlSet001\Control\Class\{49ce6ac8-6f86-11d2-b1e5-0080c72e74a2}
call RegCopy SYSTEM\ControlSet001\Control\Class\{4d36e979-e325-11ce-bfc1-08002be10318}
call RegCopy SYSTEM\ControlSet001\Control\Class\{c30ecea0-11ef-4ef9-b02e-6af81e6e65c0}
call RegCopy SYSTEM\ControlSet001\Control\Class\{c7bc9b22-21f0-4f0d-9bb6-66c229b8cd33}
rem add services
call RegCopyEx Services Spooler
rem remove usbprint if this is additional component
call RegCopyEx Services usbprint
rem update spoolsv.exe binary
binmay.exe -u "%X_SYS%\spoolsv.exe" -s u:SystemSetupInProgress -r u:DisableSpoolsvInWinPE
fc /b "%X_SYS%\spoolsv.exe.org" "%X_SYS%\spoolsv.exe"
del /f /q "%X_SYS%\spoolsv.exe.org"
rem EnablePrintFeature
md "%X%\PEMaterial"
if 1==1 (
echo ntprint.exe
echo net start spooler
echo PnPutil.exe -i -a "%%Windir%%\inf\usbprint.inf"
)>"%X%\PEMaterial\EnablePrintFeature.bat"
rem call link "%X%\PEMaterial\EnablePrintFeature.bat" "%X_Desktop%\EnablePrintFeature.lnk"
注意:从1903开始,需要加多如下这条注册表项:
Z:\WimBuilder2\Projects\WIN10XPE\01-Components\Devices and Printers\last.bat添加
reg add "HKEY_LOCAL_MACHINE\tmp_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data" /v 41960B29A3BC0C75 /t REG_BINARY /d 0100000001000000 /f
经测试,并不是记事本不能打印,而是新的记事本可能默认使用雅黑字体,所以打印时出现参数错误。同时使用word有的文件也不能打印,发现也是用了非宋体。这些都是使用精简字体引起。
有时点打印时,打印机不提示也不动,空白文档,打印机可以打,再输几个字也可以打。至此怀疑是字体的问题,马上打开原文件,使用的是等线体,全选改宋体就可以打印。又把内核换原版字体,再试记事本也可以打了。
最后,关于打印时出现 “参数错误” 的问题,有时点打印时,打印机不提示也不动,这些都是使用精简字体引起,打印功能不能使用精简字体。切记一定要保持系统的字体是完整的!
Win10打印功能(组件)恢复(修复)相关推荐
- 关于win10启动蓝屏恢复修复失败-无法访问应用程序或系统错误代码0xc000000e的修复
出现这样的问题大多是因为硬盘中没有引导导致的. 1.首先确定是否升级了BIOS. 2.电脑是否有固态硬盘,系统是否装在固态中.或者系统是否装在除固态硬盘的其他磁盘中(比如计算机中的机械硬盘). 看蓝屏 ...
- vue html页面打印功能vue-print-nb
vue项目中,HTML页面打印功能 组件vue-print-nb 源码: https://github.com/shengbid/vue-print, https://github.com/sheng ...
- 给Win10重新装上“磁盘碎片整理”组件,修复精简系统压缩卷功能
前言 以前,做网吧系统的精简,总是喜欢把"磁盘碎片整理"功能给精简掉! 一直也没遇到什么问题,直到有家网吧换了华硕TUF GAMING B560M-PLUS.. 导致的问题 这个组 ...
- 修复win10的更新服务器,Win10系统无法更新如何修复Windows Update组件
我们在使用win10系统的时候,经常需要进行一些更新,可以给用户们带来更多的安全和更好的操作体验,但是有时候可能会遇到无法更新的情况,那么可能是Windows Update组件受损,要如何进行修复呢? ...
- WEB打印-网页打印功能(带分页、可多页打印)
<html> <head> <title>Web打印</title> <meta http-equiv="Content-Type&qu ...
- GdPicture.NET SDK Crack,提供多种打印功能
GdPicture.NET SDK Crack,提供多种打印功能 GdPicture.NET SDK(以前称为 GdPicture.NET Document Imaging SDK Ultimate) ...
- 组件分享之后端组件——基于Golang实现的database/sql附加功能组件dbr
组件分享之后端组件--基于Golang实现的database/sql附加功能组件dbr 背景 近期正在探索前端.后端.系统端各类常用组件与工具,对其一些常见的组件进行再次整理一下,形成标准化组件专题, ...
- win10 计算机组件,win10 1093哪些组件可以卸载_win10电脑无用组件怎么卸载
对于用户来说,win10系统是一个相当复杂的操作软件,除了基本的硬件之外,还包含了启动过程中的一些组件程序,可能有些用户觉得win10系统中的有些组件不需要用到,因此就想要将其卸载,那么win10 1 ...
- MIS开发中.net Framework的打印功能
Microsoft .net Framework的打印功能都以组件的方式提供,为程序员提供了很大的方便,但是这几个组件的使用还是很复杂的,有必要解释一下. 打印操作通常包括以下四个功能 1 打印设置 ...
最新文章
- 微型计算机的硬盘电源,自己动手估算电脑的功率 | 微型计算机官方网站 MCPlive.cn...
- python发送文件_Python实现基于HTTP文件传输实例
- 牛客 - 共鸣问题(贪心+思维)
- win2003 定时重启BAT
- vue点击按钮之后置成不可用_Vue 动态改变 button 的 disabled 状态
- 如何在TypeScript/JavaScript项目里引入MD5校验和
- srsLTE源码学习:逻辑信道多路复用与MAC CE分解pdu_queue.h,pdu_queue.cc
- 原码, 反码, 补码
- Premiere Elements使用指南:键盘快捷键
- sql server 2008r2 备份到局势网共享硬盘
- paddlex,2.1.0识别预测代码(包含视频的)
- 2021-2027全球及中国气提系统行业研究及十四五规划分析报告
- python 求3位数的水仙花数_python 求3到8位数的水仙花数Pycharm实现
- Java 标准输入输出流(System.in,System.out)使用
- 产品碳足迹ISO14067认证
- linux清空文件命令
- Linux安装PHP
- 【算法】传教士和野人问题
- 写给自己的话:是时候有个计划了,骚年
- 《C++ Primer (5th Edition)》笔记-Part IV. Advanced Topics