|
你會被扁的,..... PE 是用來緊急救機, 打甚麼印 !! (說笑的)
只適合 用 pebuilder DIY (YY 的有待高人大俠解答, 菜鳥肉腳只能用笨方法)
1. 到 http://www.fuwi.ethz.ch/ 下載 Virtual PDF Printer (go2pdf)
2. 再加上 自己的 printer driver plugin.
go2pdf plugin (Virtual PDF Printer) 啟動了打印服務, 借用它啟動打印服務, 免得自己搞.
此時仍未可打印, 只可輸出到 pdf 文件.
裝 com / lpt
hwpnp.exe -all +ACPI\PNP0400 +ACPI\PNP0401 +ACPI\PNP0501\1 +ACPI\PNP0501\2 /u /p
把自己的打印機驫動做好, 指定好連接埠便成.
** 先搞定 Virtual PDF Printer 再說....
下面是我的 hp plugin . HP LJ4 , HP 5000n , 8100n 以網絡share方式, 用這驅動個也成.
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="Printer HP LaserJet 4P"
Enable=1
[WinntDirectories]
a=Programs\Printers,2
c=i386\inf,2
h=i386\system32\spool\drivers\w32x86\3,2
[SourceDisksFiles]
; for SDI, we put it CD root\Programs , not SDI's Root\Programs
Printer-User1.reg=a,,1
installHPLJ4P.cmd=2,autorun7_HPLJ4P.cmd,1
HPLJ4P.BUD=h,,1
HPLJ4P.GPD=h,,1
PCL5ERES.DLL=h,,1
TTFSUB.GPD=h,,1
STDNAMES.GPD=h,,1
UNIDRV.DLL=h,,1
UNIDRV.HLP=h,,1
UNIDRVUI.DLL=h,,1
UNIRES.DLL=h,,1
[Default.AddReg]
0x1, "Printers\Settings\Wizard", "Driver Name", ""Driver Name", "HP LaserJet 4P""
0x3, "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections", "SavedLegacySettings", \
3c,00,00,00,47,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,\
00,00,00,00,00,00,00,40,c7,1c,07,02,ae,c3,01,03,00,00,00,0a,14,32,22,c0,a8,\
ed,01,c0,a8,e2,01,00,00,00,00,00,00,00,00
0x1, "Software\Microsoft\Windows NT\CurrentVersion\Devices", "HP LaserJet 4P", ""winspool,LPT1:""
0x1, "Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts", "HP LaserJet 4P", ""winspool,LPT1:,15,45""
; Begin Install Ports (COM & LPT)
[Software.AddReg]
0x2,"Sherpya\XPEinit\Programs","系統管理工具\安裝HP LaserJet 4 Plus","%SystemDrive%\programs\printers\installHPLJ4P.cmd"
0x2,"Sherpya\XPEinit\Programs","系統管理工具\安裝HP LaserJet 4 Plus","%SystemDrive%\programs\printers\installHPLJ4P.cmd||%SystemDrive%\programs\icon\printer.ico"
installhplj4p.cmd
@echo off
Title Install Printer (lpt and HP LaserJet 4P)
HWPNP.EXE -all +ACPI\PNP0400 +ACPI\PNP0401 +ACPI\PNP0501\1 +ACPI\PNP0501\2 /u /p
md b:\windows\system32\spool
xcopy %SystemDrive%\i386\system32\spool\*.* b:\windows\system32\spool /s /y
attrib b:\windows\system32\spool\*.* -r /s /d
net stop spooler
regedit.exe /s %SystemDrive%\programs\printers\printer-user1.reg
regedit.exe /s %SystemDrive%\programs\printers\printer-go2pdf.reg
net start spooler
echo net use lpt1: \\10.10.10.10\HPL5000 /User:administrator
echo net use lpt2: \\10.10.10.10\HPLaser8100 /User:user
exit
*** printer-go2pdf.reg 文件 該plugin 有提供 .
PRINTER-USER1.REG 見附件. |
|