Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

Add a "shared/network" printer via the Command Line?

$
0
0

I have created a Windows 7 image using a Powershell script that I wrote.  It takes the basic Windows 7 (Pro) operating system with just the Administrator account and adds Service Pack 1, other accounts, applications, changes settings, adds printers, turns on IIS etc etc.  The one thing I couldn't do was create what we refer to as our "POS Lexmark Printer."  These PCs will act like Clients off of a Primary Server.  They will have their own printers attached directly to the PC, but sometimes our users will want to print to the Lexmark Printer that will be attached to the Primary.  The problem is that some files needed to add this printer are not created until after a user has "configured" the PC they receive (a script that adds their location, some hosts files, etc).

To add this printer manually, after I have configured the PC, I would go to Add A Printer > Add a Network, Wireless, or Bluetooth Printer > and click on "The Printer I want isn't listed."  I would then select the radio button for "Select A Shared Printer" and input: http://lexmark1:631/printers/lexmark, click "Next" and the PC will connect to the printer then finally tell you the printer has been successfully added.

I have tried using

cscript prnmngr.vbs - a "POS Lexmark" -m "Lexmark Universal v2 PS3" -r "http://lexmark1:631/printers/lexmark"

but I get an error message that "the parameter is incorrect."  If I could figure out a way to add this printer via the command line, I could create a simple batch script as a link for our users to click on after they've configured their PCs (their Desktops will be drastically locked down with Group Policy, so they wouldn't be able to use "Add A Printer" themselves.

Or does anyone know of another way I might be able to do this?



Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>