Link to home
Start Free TrialLog in
Avatar of tucktech
tucktech

asked on

How to remove and add LOCAL printers via script

Hello, I have an environment that I want to remove the printers (including the drivers) and add them back via a script.  These printers work best if they are LOCAL so I need to have them install via the local machine and not on a print server.

These systems are on a AD Domain with the DC having Windows 2008

Windows 7 64bit and 32bit systems.
Avatar of Randy Downs
Randy Downs
Flag of United States of America image

Try this  .

VBS
set objNetwork = CreateObject(“WScript.Network”)
objNetwork.RemovePrinterConnection “\\Your_print_server\printer_name_being_removed”
objNetwork.AddWindowsPrinterConnection “\\Your_print_server\printer_name_being_added”

Open in new window


Logon Script
 @echo off 
    Pushd %~dp0 
    Cscript printerinst.vbs

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Sandeep
Sandeep
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdmailny
jdmailny

What is your exact question - this is not clear
Avatar of tucktech

ASKER

Printui scripts are the way to go for this problem.