question

deepon-8647 avatar image
0 Votes"
deepon-8647 asked StriveSun-MSFT commented

How to program the creation of a WSD printer

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-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 edited

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


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

deepon-8647 avatar image
0 Votes"
deepon-8647 answered StriveSun-MSFT commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, @deepon-8647

what I actually want to understand is how PowerShell implements it

What kind of solution do you need? I don't quite understand your question. PowerShell can be packaged into code and put into your program.

PowerShell includes detailed help articles that explain PowerShell concepts and command syntax. Use the Get-Help cmdlet to display these articles at the command prompt or view the most recently updated versions of these articles in the PowerShell documentation online.


0 Votes 0 ·