Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Server questions

Status
Not open for further replies.

rogerpatel

Technical User
Jun 14, 2005
120
0
0
Hi, I'm planning a server replacement and need some assistance.

The server i need to repalce is a standard windows 2000 server and has around 15 printers.

I have installed the new server an used Printmig and copy the printers onto the new 2003 server.

Now my problem is i have around 200 xp pc's.

Do i need to visit every pc to delete the existing printers and reinstall them all or is there something else i can do.

Currently all the pcs have the printers installed manually but using the add printer not using logon script.

I understand this could be possible using a logon script by have no idea as to how ?

Thanks
 
Type this command at the command line:

RUNDLL32 PRINTUI.DLL,PrintUIEntry /?

This will allow you to add/remove printers from a login script for all your users.

 
The server name will be changing however the pritner share name will stay the same, will this tool still work. Dam this could save me so much time.
 
Here is a snippet from MarkDmac's logon script, this will delete all printers at logon and then add the new one. The script has many more features as well and is worth a look.

faq329-5798

Code:
ON ERROR RESUME NEXT

Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path


Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")

----------------------------------------------------------------------------------------------------------------


'Remove ALL old printers
'Enumerate all printers first, after that you can select the printers you want by performing some string checks
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
'To remove only networked printers use this If Statement
    If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
      WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
    End If
'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above
'WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
Next

'Remove a specific printer
WSHNetwork.RemovePrinterConnection "\\ServerOld\HP5si",True,True


---------------------------------------------------------------------------------------------------------------

'Install Printers
WSHNetwork.AddWindowsPrinterConnection "\\Server\HP5si"


'Clean Up Memory We Used

set WSHNetwork = Nothing
set WSHSHell = Nothing
Set WSHPrinters = Nothing
  

'Quit the Script
wscript.quit

You know what Jack Burton always says at a time like this...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top