我在Linux中设置了CUPS服务器 . 我想以编程方式将此打印机添加到我的Windows中 . 手动我能够添加 . 通过搜索各种论坛,我发现以下命令:

rundll32 printui.dll,PrintUIEntry / if / b "TestPrinter_With_Auth" / f%windir%\ inf \ ntprint.inf / r“https://username:pasword@ipp.devCups.com/printers/Printer " /m " HP Color LaserJet 2500 PCL6 Class Driver”

我可以使用此命令安装打印机 . 但我无法打印到CUPS,因为它没有识别凭据 . 我被拒绝访问 .

任何以编程方式实现此目的的建议 .

提前致谢

马特