Creating a script to re map printers

Hi All,

Our office is conducting a move with many hundreds of users from one location within a building to another and I have been tasked with coming up with a script that will remap those users printers so that upon logging in the following morning and running the logon script they will attach to the appropriate printers.  

At this time I would like to break down for you how our current environment is setup:

We have three buildings on site and within each building there are designated printers in which everyone within that building will map to.  There are also many freestanding network printers that users map to as is necessary.  Within Active Directory we have security groups created which (assuming the user is a part of that group) in turn run a vb script that installs printers for those users.

Below is a small part of our logon script to Illustrate:

\\CRP*****.*****.LOCAL\NETLOGON\IFMEMBER "*******Local\CRP-secBld300"
IF NOT errorlevel 1 GOTO NEXT

Below is the corresponding VB script that runs if user is a part of said Security Group

Set objPrinters = WScript.CreateObject("WScript.Network")
Set objShell = WScript.CreateObject("WScript.Shell")
'Remove old printers
objPrinters.RemovePrinterConnection "\\crp******\3-141-Xerox4260c"
'Install new Printers
objPrinters.AddWindowsPrinterConnection "\\crp******\3-141-Xerox5225c"

'Clean Up Memory Used
set objShell = Nothing
Set objPrinters = Nothing

With that said I was hoping to gain some assistance with creating a new script that determines if a user is connected to a certain printer (rather than Security Group) and if so deletes that printer and remaps a new printer in it's place.  The many users who are moving are not part of any one constant Security Group and therefore makes it difficult for me to modify the current scripts we have in place to automatically map the printers for the users.  

What I am hoping to do is have a script in place that will check the users accounts for certain connected printers that I know will be a part of the move and upon determining the user is connected to that printer, delete the printer and re-connect to the printers new location.  I plan on implementing the new Logon script the day following the move.

If anyone has any idea's on how to accomplish this task it would be much appreciated.  I'm also open to new idea's as well.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RyanMyers83Author Commented:
Hi Viadas911,

I appreciate the comment however that script assumes we know which printers the user is going to get.  We also have some printers on site that only certain users have access to such as payroll or HR related.  I know where the printers will be located but I don't know who has connected to what printer other than the main printers on each floor.  I was hoping to craft a script that would compare the users installed printers to a list of printers in the move and, if matched, deletes the matched printers and re-connects the new *moved* printers.  This would ensure that the users printers that had moved along with the user had remapped correctly.  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.