+ Post New Thread
Results 1 to 12 of 12
Windows Thread, Mapping Printers based on Location in Technical; Hi Guys, This is my first post here at EduGeek... I can't believe I have been able to survive without ...
  1. #1

    Join Date
    Jul 2007
    Location
    Berkshire
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Mapping Printers based on Location

    Hi Guys,

    This is my first post here at EduGeek... I can't believe I have been able to survive without this resource for so long! Thanks for all of the help other threads have given me over the past few months.

    We are attempting to redesign our layout here and I have been put in charge of the print architecture. Here is my problem:

    As with any establishment such as this I have a number of buildings, floors and rooms to fit up. A requirement that has been handed to me from above is that we will be implementing "Line of Sight" printing, which means printers must be mapped to workstations based on their location.

    I was hoping to be able to do this with W2k3R2, having GPOs assigned to OUs that are based on the locational heirarchy (Bulding 1 > Floor 2 > Room 3 etc). R2 deploys printers absolutely perfectly. HOWEVER!

    Another requirement is that workstations are often reassigned to different rooms. R2 promised me that if I simply moved the workstation to the appropriate new OU (workstations are not moved often enough to warrent the bit being automated) it would drop the old printer mappings and add the new one(s). But - it doesnt, the whole thing screws up and gets me in a right pickle. (As Friez documents in here).

    What I need is a script that will give me this functionality - unfortunately I am not confident enough in scripting to even know where to start.

    - On computer start, clear print mappings
    - On computer start, query the AD for the OU that the workstation is in
    - Map the printer that is appropriate for the OU

    And hopefully this would solve the problem!

    I realise that this might sound a bit waffley so feel free to ask me any questions that would aid in clariffication.

    Thanks in advance,

    Jordan

  2. #2

    Join Date
    Jan 2007
    Location
    oop north
    Posts
    131
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Mapping Printers based on Location

    Just make sure you drop all printers at the start of a script before adding one?

    Eg:

    rundll32 printui.dll,PrintUIEntry /dn /n \\printer_path\printer_name

    If you're going to apply the script thought policy then you won't need a query to discover in which OU the computer object resides.

  3. #3
    mullet_man's Avatar
    Join Date
    Oct 2005
    Location
    Oldham
    Posts
    726
    Thank Post
    34
    Thanked 46 Times in 45 Posts
    Rep Power
    26

    Re: Mapping Printers based on Location

    Check out Ric_'s printer script...

    http://edugeek.net/index.php?name=Fo...=104925#104925

    It is really easy to setup and maps printer via computer name. It sounds exactly what you need.

  4. #4

    Join Date
    Jul 2007
    Location
    Berkshire
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Mapping Printers based on Location

    Thanks Mullet,

    Another thing that I fogot to say was that computer names are not a useful identifier. They are all based on the asset tag of the machine which means nothing

    /sniff!

  5. #5
    mullet_man's Avatar
    Join Date
    Oct 2005
    Location
    Oldham
    Posts
    726
    Thank Post
    34
    Thanked 46 Times in 45 Posts
    Rep Power
    26

    Re: Mapping Printers based on Location

    There is also a printer script around here that assigns via the OU in Active Directory.

    Just search the forums for printer script

  6. #6
    mullet_man's Avatar
    Join Date
    Oct 2005
    Location
    Oldham
    Posts
    726
    Thank Post
    34
    Thanked 46 Times in 45 Posts
    Rep Power
    26

    Re: Mapping Printers based on Location

    Here you go,

    Check the script a few posts down

    http://edugeek.net/index.php?name=Fo...r=asc&start=45

  7. #7

    Join Date
    Jul 2007
    Location
    Moray, Scotland
    Posts
    11
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Mapping Printers based on Location

    We use R2 to deploy printer based on location exactly as you are trying to do.

    I wasnt aware of any issue in moving a machine from one OU to another until I read your post. So this afternoon I've put it to the test.

    Thankfully all works as its supposed too. Only the printers assigned to the particular OU are available, and ones from previous OU's are gone.

    The only slight confusion was that after moving the computer and rebooting the first print dialog box that appeared sometimes listed the printers from the previous OU only. Closing the dialog box and trying again gave the correct list.

  8. #8

    Join Date
    May 2006
    Location
    Surrey
    Posts
    64
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Mapping Printers based on Location

    Good old CON2PRT in the logon scipt that matches the printers to a variable set on the computer. It does the job.

  9. #9

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,051
    Thank Post
    209
    Thanked 427 Times in 307 Posts
    Rep Power
    144

    Re: Mapping Printers based on Location

    Look at this post
    http://www.edugeek.net/index.php?nam...maniac+printer

    About half way down is a VBS script I use for mapping printers based on active directory OU. Been using this for a year now, and it's been ultra reliable, and works a treat! I can't take credit for the script, I found it on a scripting site. With a slight modification you can run the same script at logoff to remove the printer connections. This can be useful if you use roaming profiles to stop the printers being saved to the profile.

    Cheers,

    Mike.

  10. #10

    Join Date
    Feb 2006
    Location
    Dorset/Hants
    Posts
    87
    Thank Post
    2
    Thanked 13 Times in 10 Posts
    Rep Power
    20

    Re: Mapping Printers based on Location

    Rather than relying on PC names and tables of rooms, I've had ours using the AD "Location" property.

    Logon script reads workstation location then finds in AD the printer with matching location.

    It means you don't have to be so careful with workstation names and can quickly redirect to another printer.

    Staff get the local printer mapped first, then all others mapped (because it takes quite a while at logon), kids just get the single printer.

    We have a default "blackhole" printer as a sink for circumstances where there is no printer/someone forgets to set a location.

  11. #11

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,593
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Mapping Printers based on Location

    The wiki is also a good source of information http://edugeekwiki.rm-charlton.net/i...ed_on_Location

  12. #12

    Join Date
    Nov 2006
    Location
    Reading, UK
    Posts
    487
    Thank Post
    30
    Thanked 14 Times in 8 Posts
    Rep Power
    18

    Re: Mapping Printers based on Location

    I have a script that will do exactly what you want. It's our current setup. You will need to modify it for your domain, your OU's and so forth.

    See the script attached your need to download and rename the extension to .vbs.

    Good luck!
    Attached Files Attached Files

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 50
    Last Post: 19th May 2008, 12:24 PM
  2. cgi-bin location
    By dezt in forum Web Development
    Replies: 7
    Last Post: 13th October 2007, 10:10 PM
  3. Location?
    By witch in forum Comments and Suggestions
    Replies: 14
    Last Post: 7th September 2007, 06:20 PM
  4. Assinging printers to clients based on OU
    By originofsymmetry in forum Network and Classroom Management
    Replies: 3
    Last Post: 11th July 2007, 06:02 AM
  5. Setting Printers Based On Room Location
    By ICTNUT in forum Scripts
    Replies: 34
    Last Post: 13th May 2006, 08:19 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •