How to program the creation of a WSD printer

deepon 1 Reputation point
2021-03-22T10:50:34.24+00:00

I need to program to automatically add network printers and scanners that only allow the use of the Windows API. I've checked a lot of sources and can't find any clues, does anyone have any relevant information or experience?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,426 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 81,741 Reputation points
    2021-03-22T12:12:24.337+00:00

    From this thread, it can be done with PowerShell with Add-Printer and -DeviceURL/DeviceUUID parameters
    So you could call the PowerShell script/command from your code

    0 comments No comments

  2. deepon 1 Reputation point
    2021-03-23T01:40:49.177+00:00

    Thanks for your help, I understand that PowerShell has this command, what I actually want to understand is how PowerShell implements it