Link to home
Start Free TrialLog in
Avatar of babaganoosh
babaganooshFlag for United States of America

asked on

Add / remove printers on existing SBS 2003 R2 network - this is probaby real basic but I need help!

My SBS networks are very steady state.  But I have 1 where the 2 original network printers are 1 - being removed and another is being moved to a desktop.

ANd a new network printer is coming in.

without going to every desktop (we have local profiles, not roaming), how do I:

remove the 2 old printers from each person's list of printers
Add this new printer to each person's list of printers (I know how to add it to the server and share it, but then how does that show up on each machine.  I know when setting up SBS with the wizards, you set up the printer first and then the users get the printers that exist at that point.  but going forward how do you add / remove printers to each user's profile)?

ANd the 1 printer that is being connected to a desktop and shared to a couple pcs in that room.  How do we keep xp from automatically adding that printer to everyone's profile because it's a shared printer on the same subnet - you know - you get that 'auto HP laserjet....' icon that was created automatically by the xp desktop.

THANK YOU!
ASKER CERTIFIED SOLUTION
Avatar of EddyGurge
EddyGurge

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 EddyGurge
EddyGurge

Oh, and I should mention the script actually adds the new one, THEN deletes the old one.  Not sure if that was clear or not from the script.
Avatar of babaganoosh

ASKER

thanks for the info.  I came across this - I don't know the first thing about vb script.  this also sets the default printer.

yours, every time you log in, (tries to) delete the old printer?  That's OK?

how does yours with the strconnectstring differ from this net.....

Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\spock\LJ4014n"


' Set the default printer now
' net.SetDefaultPrinter "\\spock\lj4014n"

and I guess i'd add
net.RemoveWindowsPrinterConnection "\\spock\lj4050"
ok, on an xp box, I got an error about the last line - remove

And the default pritner comment is remmed out, right?  I think that was because some people didn't want the 4050 as their default.

I'll use your script I guess : ) ?
but again - what is the difference in your script and mine (mine being the net. command at the start... and your delete command works)
I'm not a script expert at all, but I do notice that in the one I use, the printer name is put into a variable, then used in the command.  On the description pages for these commands from Microsoft, it also uses a variable, instead of a string when connecting and disconnecting.  Check here:

http://msdn.microsoft.com/en-us/library/tsbh2yy7(VS.85).aspx

As far as it trying to remove the printer every time, I've had no issues at all.  I didn't see an IfExist type method to add, but it seems to work perfectly now.  I figure after a few months, I'll just rem the script out anyway.


Thanks for the info.  


I may have missed something - you said 'I added this to the login group policy of the OU'

I set this up as a file called printer.vbs and then called it from the logon batch file.  are you doing something different?

And I had to remove 'windows'  from your
net.RemoveWindowsPrinterConnection

command.  which is how it shows in that link you included!  

Yeah, I don't know the first thing about scripts myself.  just enough to take code someone else used, and maybe change some fields to do what I want it to do!

amazing, I think - they have all these wizards in sbs but nothing for something like this - adding a printer once the network is up and running and deleting old printers.

thanks!
I'm not fully up on the variances between SBS and regular 2003 server, but it sounds like basically the same thing.  Since I didn't already have any kind of login batch file, I just added the printer script.  As long as you can get it running, that's all that really matters.
true!