Topic: Printer Support!!  (Read 1234 times)

Printer Support!!
« on: July 07, 2019, 11:05:05 AM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
Hi Everyone, especially Aeolis
I have tried Aeolis printer support script many times but WinBuilder gives error on copying necessary files. Is there anyone who could accomplish adding printer support to Win10PE?
Once I was able to add support to Windows7 32 bitPE, but only for XPS printing, of course with Aeolis script. But I couldn't add my printer to system. I'm looking forward to a solution.
Best Regards.

Re: Printer Support!!
« Reply #1 on: July 13, 2019, 12:55:52 AM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, sharp
Printer component is already in WimBuilder's project since v2019.06.21.
Unfortunately it seems can't create the XPS or PDF built-in printers in new Windows version,
and I don't have real printer to test it, just convert others' files/registry items to be a component.

http://theoven.org/index.php?topic=2390.msg33459#msg33459

The latest version is v2019.07.08, but nothing change for Printer.

noelBlanc shared his full functional winpe (RS5), which one has the working printer function, you can try it.
http://theoven.org/index.php?topic=1639.msg33169#msg33169

With his work, I will make printer work on RS5, and try to support it on 19H1, 20H1. but I don't have time to do it now.
« Last Edit: July 13, 2019, 12:56:44 AM by slore »

Re: Printer Support!!
« Reply #2 on: July 13, 2019, 11:02:02 AM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
Hi, slore
I think we are talking about different things. I'm working on PE systems and currently using Win10PE_SE_2019-04-12 project with WinBuilder [082]
not Wimbuilder. There is a N and M difference between programs.
I have examined noelBlanc's system. Yes, you are right, the system has a printer support.
I googled for this and find a bat file.
Code: [Select]
rem ==========update filesystem==========

set AddFiles_Mode=merge
rem devices and printers
call AddDrivers "c_pnpprinters.inf,c_printer.inf,PrintQueue.inf,printupg.inf,usbprint.inf"

rem base drivers
call AddDrivers "ntprint.inf,ntprint4.inf,tsprint.inf,wsdprint.inf"
call AddDrivers "prnms003.inf"

call AddFiles %0 :end_files
goto :end_files

\Windows\splwow64.exe
\Windows\PrintDialog

\Windows\Inf\prn*.inf

\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\

DafPrintProvider.dll
DevDispItemProvider.dll,DeveloperOptionsSettingsHandlers.dll,deviceassociation.dll
DeviceCenter.dll,DeviceDisplayStatusManager.dll
DeviceEject.exe,DeviceElementSource.dll,DeviceEnroller.exe,DevicesFlowBroker.dll,DeviceMetadataRetrievalClient.dll
DevicePairing.dll,DevicePairingFolder.dll,DevicePairing.dll,DevicePairingProxy.dll,DevicePairingWizard.exe
deviceregistration.dll
DeviceUxRes.dll,devinv.dll,DevPropMgr.dll,DevQueryBroker.dll,efswrt.dll
FaxPrinterInstaller.dll,fdPnp.dll,fdWNet.dll,fdWSD.dll
fxsapi.dll,FXSMON.dll,FXSRESM.dll,gpprnext.dll,hgprint.dll,icm32.dll,icmui.dll
inetppui.dll,IPPMon.dll,localspl.dll,localui.dll,mgmtapi.dll
newdev.exe,ntprint.dll,ntprint.exe,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.dll,tcpmon.ini,tcpmonui.dll,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,XPSSHHDR.dll
xwizard.exe,xwizards.dll,xwtpdui.dll,xwtpw32.dll

;V1803
coloradapterclient.dll

;Document and Device
defaultdevicemanager.dll
defaultprinterprovider.dll
fundisc.dll
FdDevQuery.dll
fdprint.dll
DDOIProxy.dll
RemoveDeviceContextHandler.dll
DeviceDisplayStatusManager.dll

;mof: "wmi win32_printer"
wbem\win32_printer.mof
;mof get-printer
wbem\PrintManagementProvider.*

;"printer option" menu
compstui.dll

;Sharing printers on Local Network
findnetprinters.dll
wsnmp32.dll

;Printer PDF
spool\tools\Microsoft Print To PDF\
spool\tools\Microsoft XPS Document Writer\
DeviceSetupManager.dll
DeviceSetupManagerAPI.dll
DeviceSetupStatusProvider.dll
DeviceDriverRetrievalClient.dll

;V1809 dsmsvc
DeviceSoftwareInstallationClient.dll

;Printer XPS
;V1809
ApMon.dll,AppMon.dll,bidispl.dll
;Absence in V1803 and V1809???
xpsrchvw.exe

;Print on Internet
inetpp.dll

;For PDF and XPS
OpcServices.dll
xpsservices.dll
XpsRasterService.dll

:end_files

call DoAddFiles

rem ; V1709
SetACL.exe -on "%X_SYS%\spool\PRINTERS" -ot file -actn ace -ace "n:Everyone;p:full;s:y"

; V1803
rem prn*.inf

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 avoid error: "the printer driver is not compatible with a policy on your computer which disable NT4.0 driver"
reg add "HKLM\Tmp_Software\Policies\Microsoft\Windows NT\Printers" /v KmPrintersAreBlocked /t REG_DWORD /d 0 /f

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
if 1==1 (
  echo X:\windows\system32\wbem\mofcomp.exe X:\windows\system32\wbem\win32_printer.mof
  echo X:\windows\system32\wbem\mofcomp.exe X:\windows\system32\wbem\PrintManagementProvider.mof
  echo ntprint.exe
  echo net start spooler
  echo PnPutil.exe -i -a "%%Windir%%\inf\usbprint.inf"
  echo drvload.exe "%%Windir%%\inf\printqueue.inf"
)>"%X_PEMaterial%\EnablePrintFeature.bat"
rem call link "%X_PEMaterial%\EnablePrintFeature.bat" "%X_Desktop%\EnablePrintFeature.lnk"
pause
Now, the question is, how can I convert these batch codes to our script? (Plugin)
Is there any program that can do it? Once I have used bat to reg converters, but bat to plugin...
I don't know, may be you can help me with this bat file, or someone else in this forum.
Regards.
« Last Edit: July 13, 2019, 11:05:03 AM by sharp »

Re: Printer Support!!
« Reply #3 on: July 13, 2019, 02:41:04 PM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, sharp
I know there is  a N and M difference between programs.

I created WimBuilder, because WinBuilder is dead, and the mess syntax is hard to learn.
WimBuilder use batch file, which is widely known, and shows the direct required files and registy items.
What you googled is just my WimBuilder's printer component batch patch(plugin).
https://github.com/slorelee/wimbuilder2/blob/master/Projects/WIN10XPE/01-Components/Printer/main.bat

As I said, I don't learn WinBuilder's syntax,so  I can't write or convert it to be the plugin.
But with the filelist and registy items, people can add them manually, so somebody can create a plugin for WinBuilder with the batch code.

WinBuilder is dead, but the PE build projects is alive, no matter what PE builder you are using.

It is still experimental patch(plugin). I create a PE in 1 minute with 20H1(10.0.18932) install.wim, but I can't got the built-in PDF, XPS printers.
The install printer settings can work, but I don't have real printer to test it.
I need some help about the drivers part, when noelBlanc come back, I will ask him.

ila_rendered

Re: Printer Support!!
« Reply #4 on: July 14, 2019, 07:56:32 AM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
Hi, slore
Forgive me that I didn't realize the main.bat file is yours.
I'm really ashamed... I examine the batch file and congratulate you
for your wisdom and knowledge.
I wish I could help you about the drivers part, I have a real printer
so if you want me to do something I'm ready.
May be I'm not able to login everyday in this forum but at least 4 times
in a week, I'll be in the forum.
Regards.

Re: Printer Support!!
« Reply #5 on: July 14, 2019, 01:44:30 PM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, sharp
I created a v2019.07.14 Pre-release WimBuilder2 for testing printer.
https://github.com/slorelee/wimbuilder2/releases

direct download url:
https://github.com/slorelee/wimbuilder2/releases/download/v2019.07.14/WimBuilder2-Full.7z

How use it?
1. mount your Windows10xxxx.ISO
2. Run WimBuilder.cmd. and click the [Browse ...] to select the mounted drive(eg. H:)
3. click [Next] to the Project page
4. click [Next] to the Patch page
5. check and select the [Devices and Printers], select [Printer] in [Devices and Printers] page
6. click [Next] to the Build page
7. click [Build(CMD)] to build, after the building done, click [Make ISO]

The wim is created in WimBuilder2\_ISO_\sources\boot.wim.
The ISO is created in WimBuilder2\_Factory_\BOOTPE.ISO.

boot the ISO, after booting, go to X:\PEMaterial\, run the EnablePrintFeature.bat,
run control to open the control panel, and you can try to add a printer in devices and printer settings.

Regards

Re: Printer Support!!
« Reply #6 on: July 15, 2019, 12:59:47 PM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
I followed your instructions, everything went fine.
But when it comes to testing iso, after booting PE system I saw desktop and
"Configuring System" appeared. Then everything went black, just a black screen.
I waited and waited. After ctrl+alt+delete, task manager window came, I tried to launch explorer
as a new task but nothing happened. In the processes tab, there was usual programs running, except for Explorer.exe
P.S. I write iso file once with Rufus, and once with AIO.

Re: Printer Support!!
« Reply #7 on: July 15, 2019, 01:53:41 PM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Quote
"Configuring System" appeared. Then everything went black, just a black screen.
I waited and waited. After ctrl+alt+delete, task manager window came, I tried to launch explorer

 :sad: Which Windows ISO you used? I tested en-US, Zh-cn is fine(RS5, 19H1, 20H1).

Re: Printer Support!!
« Reply #8 on: July 16, 2019, 07:44:56 AM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
I've tested in Win10_1809Oct_v2_English_x64.iso...

Re: Printer Support!!
« Reply #9 on: July 16, 2019, 04:04:44 PM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, sharp

I tested en_windows_10_consumer_editions_version_1809_updated_march_2019_x64_dvd_72376bfd.iso with index:1 Home, index:6 Pro,
both OK on booting.

CRC32: D8047F73
MD5: AB22088758DBC5A13247FFC64C36F9A8
SHA-1: E448FD3CEB724A924A2AFCE17D80739329C30C74

AND I downloaded a SUMSUNG printer driver, and it can be intalled.
ila_rendered

Do you test it on real machine? or vitrual machine?
I'm using VitrualBox to test the ISO.


Re: Printer Support!!
« Reply #10 on: July 18, 2019, 09:52:57 AM »

sharp

  • Jr. Chef
  • **
  • Date Registered: Jun 2019
  • Posts: 76
I tested it on real machine. As far as I know in some cases, VM differs from real ones.
So I usually test PE systems on real machines.

 

Powered by EzPortal