Recently, I needed to automate the installation of network printers in a Windows 7 and Windows Server environment. In this tutorial, I will outline the VBS script we will leverage for port creation, and I will also describe the use of rundll32 to install print drivers silently and to create printers. Modern Windows operating systems such as Windows 7, Windows 8, and Windows Server have great built-in scripting tools and utilities.
However, most users are not aware of these abilities. The guide below includes an example. Download the appropriate printer driver for the printer you will be installing. Once downloaded, use 7-zip or other decompression tool to extract the driver packages. We do not actually want to install them. We only want to extract them. As you are trying to write the VB scripts, it is recommended to post your question on the Official Scripting Guys Forum for further discussion. The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
Thank you for your understanding. TechNet Subscriber Support. If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here. TechNet Community Support. Hi Alceryes,. Thank you for your sharing which will direct other communities who encounter the similar issue. Office Office Exchange Server. Not an IT pro? Windows Client. Sign in.
Let us know how it works out! Frank Jun 28, at UTC. I was successful mapping the printers via the VBS script below. Thanks for the tips.
Firefoxthebomb May 29, at UTC. Gondor81 Jan 31, at UTC. EnumPrinterConnections 'This For Loop goes through the Printers and only installs the printer if it is not already installed. Count - 1 Step 2 if InStr oPrinters. Echo "Printer not installed" netPrinter. This would be extremely helpful for our temporary staff that needs access to our printer rather than manually trying to find it.
If anyone is aware of the code to add a network printer via script I would be greatly appreciative. Was this reply helpful? Yes No. Sorry this didn't help. Thanks for your feedback. Will this work universally for other employees though if i were to share it or is the printer server ip address only going to work for myself? I probably entered something in wrong because I removed the device from my printers to see if it would install itself but it didn't.
Thanks again.
0コメント