|
-
Jul 12th, 2005, 09:41 AM
#1
Thread Starter
Addicted Member
Convert VBS Script to .Net
I am trying to convert this so it will work in .Net
In the following script, replace PrinterDriver with the name of the driver you are adding and \\Server\Printer with the name of the shared printer and server:
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\Server\Printer"
PrinterDriver = "PrinterDriver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\Server\Printer"
anyone have any idea how to do this? It should be simple but I can't find much help on google or MSDN mapping a network printer using .Net
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|