Solved

Map and dismount printer connections

Posted on 2009-07-15
4
650 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

737 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