Solved

Map and dismount printer connections

Posted on 2009-07-15
4
649 Views
Last Modified: 2012-05-07
Hello.
I have Server 2008 Server with printer role installed. I can configure the printer connections for Servers and Vista. But I have a lot of Windows XP computers, so I need to set the printers for them, I also need to remove the exist printer connections.

I tried so: RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /c\\machine /n\\machine\printer
It does not work.

Please help.
0
Comment
Question by:Master-Squirrel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
John_Miller earned 250 total points
ID: 24860382
Take a look at the code listed below...substitute your printer server name and share accordingly.


'Add a Printer
 
Set WshNetwork = CreateObject("WScript.Network")
 
WshNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300"
WshNetwork.SetDefaultPrinter "\\PrintServer1\Xerox300"
 
' Delete a Printer Connection
 
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.RemovePrinterConnection "\\PrintServer\xerox3006"

Open in new window

0
 

Author Comment

by:Master-Squirrel
ID: 24866683
Yes, it works. I mark this question as answered after you say to me does it work with Vista and Server 2008?
0
 
LVL 1

Expert Comment

by:John_Miller
ID: 24868596
Yes, these work with one exception. They will not work if you have a desktop (Vista or XP) running 64-bit and you have not loaded the 64-bit drivers onto the print server.
0
 

Author Comment

by:Master-Squirrel
ID: 24895169
Thanks for you help.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question