Automatic printer installation/creation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way from within a C# app to create a printer? I am looking to
automate the creation of (possibly) dozens of printers, to prevent having to
go through the "Add Printer Wizard" so many times. The app will have
access to all the info necessary as if "Add Printer Wizard" was being used, I
just need to know if there's an elegant way to do this (short of nasty
registry hacks).
 
Thanks for the reply - I think we have actually got this working now here.
We are using the Interop services, and making an API call (AddPrinter) to do
what we want. We found some additional information here:
http://www.printdistributor.com/forum/post/121

The structures referenced are explained here:
http://msdn2.microsoft.com/en-us/library/ms536023.aspx
and
http://msdn2.microsoft.com/en-us/library/ms535509.aspx

I was also able to do the reverse, namely delete the printer that I
previously created, by using the DeletePrinter function. Good luck.
 
Back
Top