->
I want to know can I add printer programatically?
E.g. I want to create a File Printer to a specify local port, say,
C:\test\test.prn with the name as FilePrinter
You can do it using wscript and then call the script inside C#. See msdn link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/script56/html/wsmthsetdefaultprinter.asp
var WshNetwork = WScript.CreateObject("WScript.Network");
var PrinterPath = "\\\\research\\library1";
WshNetwork.AddWindowsPrinterConnection(PrinterPath);
WshNetwork.SetDefaultPrinter(PrinterPath);
--
Adrian Mascarenhas, Developer Division
This posting is provided "AS IS" with no warranties, and confers no rights.
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.