获取打印机名称
wmic printer get name
设置默认打印机
wmic printer where name="打印机名称" call setdefaultprinter
打印测试页
rundll32 printui.dll,PrintUIEntry /k /n "打印机名称"
删除打印机
rundll32 printui.dll,PrintUIEntry /dl /n "打印机名称"
添加打印机
rundll32 printui.dll,PrintUIEntry /if b "打印机名称" /f "驱动程序文件路径" /r "端口名称"
本文介绍了如何通过WindowsManagementInstrumentationCommand(WMIC)进行打印机管理,包括获取打印机名称、设置默认打印机、打印测试页、删除和添加打印机,以及相应的命令行参数。
886






