datocp
2 天前
这可是个高深的问题。我觉得可能原因就是电源节能选项,让电脑网络断开,又或者打印机进入节能选项,可能需要按一下电源唤醒。
平时不管直接导入网络共享
netshare.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"restrictanonymous"=dword:00000000
"restrictanonymoussam"=dword:00000001
"forceguest"=dword:00000000
"limitblankpassworduse"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]
"autoshareserver"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"AutoShareWks"=dword:00000001
win10 以后增加了这段
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print]
"RpcAuthnLevelPrivacyEnabled"=dword:00000000
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint]
"RestrictDriverInstallationToAdministrators"=dword:00000000
打印服务器,重置打印机.cmd,有些打印机会进入暂停打印状态,需要注释掉,最后一行,但是似乎在部分驱动下该设定无效。。。
net stop lanmanserver /y
net stop lanmanworkstation /y
::运行 spool 删除
net use * /delete /y
net stop Spooler
del /s /q %systemroot%\system32\spool\PRINTERS
net start Spooler
net start lanmanserver /y
net start lanmanworkstation /y
::cancel all print jobs
::cscript C:\Windows\System32\Printing_Admin_Scripts\zh-CN\prnqctl.vbs -x -p "Adobe PDF"
::pause printing
::cscript C:\Windows\System32\Printing_Admin_Scripts\zh-CN\prnqctl.vbs -z -p "Adobe PDF"
::Resumes printing
::cscript C:\Windows\System32\Printing_Admin_Scripts\zh-CN\prnqctl.vbs -m -p "Adobe PDF"