1

I have a CUPS server setup in Linux.I want to add this printer to my windows programmatically. Manually I am able to add.By searching various forums I found the following command:

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"

I could install Printer using this command. But I couldn't Print to CUPS as it is not recognizing the credentials. I get access denied.

Any suggestion to achieve this programmatically.

Thanks in Advance

Matt

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Doing a lot of research and manually registering using 'Add Printer' I see the registry details of username & password in example: [HKEY_CURRENT_USER\Printers\Inetnet Print Provider\Ports\https://username:password@ipp.devCups.com/printers/printer]. I export these credentials & uninstall which I install manually. Later I run rundll32 & nothing comes in registry. This time I manually enter to registry & it worked. But this works only on my pc. Microsoft is using hash algo to protect the binary data in registry.So any idea to create this registry similar like microsoft does ? – mathewsnjoy Nov 21 '17 at 12:58

0 Answers0