adding printer via script

G

Guest

Hi,
apologies if ive posted in the wrong group.

i need to get a printer installed locally on a laptop i dont want to give
the user
the admin password to install printer. is there a way using a script to allow
add print wizzard to run in elevated priviledges.
or use vb script to install the printer completely.


this printer is located at a remote office would be nice just to send a file
that would accomplish this.
would this be asking to much.

thanks in advance.
mundo
 
A

Alan Morris [MSFT]

You can accomplish using the WMI print providor and target the remote
machine since you have admin rights to the remote machine (I assume). The
biggest issue is getting the driver installed if it's not inbox /? on any
of the scripts. The -i parameter in prndrvr.vbs needs to include the inf
name and the driver needs to be signed.

prnmngr.vbs in system32 of XP or greater OS.

prnport.vbs will create a Standard TCP/IP Port

prndrvr.vbs to add Vendor drivers (but the files need to be local on the
remote machine)

prnmngr.vbs to add the printer (if the driver is inbox just specifiy the
driver name).

this will add the printer Printer Name to machine remotemachine

prnmngr -a -m "hp laserjet 4" -r LPT1: -p "Printer Name" -s remotemachine
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Added printer Printer Name


--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top