+ Post New Thread
Results 1 to 10 of 10
Windows Thread, Detect local printer, check if connected, use as default if connected? in Technical; I'd like to be able to provide the following at login for certain users / computers. Deployment of the settings ...
  1. #1


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,629
    Thank Post
    275
    Thanked 777 Times in 604 Posts
    Rep Power
    223

    Detect local printer, check if connected, use as default if connected?

    I'd like to be able to provide the following at login for certain users / computers. Deployment of the settings is easy.

    When a user logs on (and/or a computer starts up).....

    1. Detect if a local USB-connected printer is installed
    2. Detect if the local USB-connected printer is connected
    3. If it is installed and connected, set it as the default printer
    4. Otherwise set an appropriate network printer as the default


    It's the reliable detection logic that's escaping me at the moment. Any ideas?

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    Not without a lot of code and to be honest, I don't see the point. You can deploy printers with 2003 R2 or 2008 based on per user or per computer or a combination.

  3. #3
    jsnetman's Avatar
    Join Date
    Oct 2007
    Posts
    887
    Thank Post
    23
    Thanked 134 Times in 126 Posts
    Rep Power
    39
    You can do this using group policy preferences as I did it in my last job, but can't exactly remember exactly how to do it. I think it is an option somewhere in GPP.

    Here is a link http://technet.microsoft.com/en-us/l.../cc754824.aspx

  4. #4

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    There is an option in Group policy preferences to only apply a printer if there is not a local printer

  5. #5

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,675
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    45
    Quote Originally Posted by Michael View Post
    Not without a lot of code and to be honest, I don't see the point. You can deploy printers with 2003 R2 or 2008 based on per user or per computer or a combination.
    The problem there is, as I've discovered today is that the default printer is set to the depoyed printer.

    Win 7 is proving to be a bit of a pain with it's default printer choice the first time a user logs in. Even if there is a local printer my experience so far is that it decides to use a network printer as the default and whilst a user can change it back and it stays back this first time issue is confusing/irritating people.

  6. #6
    meastaugh1's Avatar
    Join Date
    Jul 2006
    Location
    London/Hertfordshire
    Posts
    890
    Thank Post
    69
    Thanked 85 Times in 70 Posts
    Rep Power
    32
    I don't think this option in GPP works. GPP Local Printer Problem

    I suggest you use a login script to compliment GPP that will search for printers with USB (or whatever) in the port name and set it as default.

  7. #7


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,577
    Thank Post
    228
    Thanked 853 Times in 732 Posts
    Rep Power
    294
    i cheat i just make sure all local printers are called "local printer" and use a vbs to select that as default (if it dosent exist then it just exits) will still select it if its off though

    Code:
    ' Printers.vbs - Jonathan
    Option Explicit
    Dim objNetwork
    
    On Error Resume Next
    
    Set objNetwork = CreateObject("WScript.Network")
    
    'objNetwork.RemovePrinterConnection "\\server2\MonoPhot", true, true 
    'objNetwork.RemovePrinterConnection "\\server2\Photocopierbw", true, true
    'objNetwork.RemovePrinterConnection "\\server2\suitebw01", true, true
    'objNetwork.RemovePrinterConnection "\\server2\suitecol01", true, true
    'objNetwork.RemovePrinterConnection "\\server2\SWS", true, true
    
    
    objNetwork.AddWindowsPrinterConnection "\\server2\Colour_copier"
    objNetwork.AddWindowsPrinterConnection "\\server2\Lasercol"
    objNetwork.AddWindowsPrinterConnection "\\server2\Mono copier"
    
    objNetwork.SetDefaultPrinter "\\server2\mono copier"
    objNetwork.SetDefaultPrinter "Local Printer"

  8. #8

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,675
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    45
    Quote Originally Posted by sted View Post
    i cheat i just make sure all local printers are called "local printer" and use a vbs to select that as default (if it dosent exist then it just exits) will still select it if its off though
    Yes, that idea had occured to me today on the way into work. Bit of a faff to rename the local printers... usfull if you think of it at the start.

  9. #9


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,577
    Thank Post
    228
    Thanked 853 Times in 732 Posts
    Rep Power
    294
    Quote Originally Posted by Stuart_C View Post
    Yes, that idea had occured to me today on the way into work. Bit of a faff to rename the local printers... usfull if you think of it at the start.
    Could you write a script that puled all local printer names to a file then just have a long list of default printers messy but would work

  10. #10
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,166
    Thank Post
    563
    Thanked 153 Times in 139 Posts
    Blog Entries
    78
    Rep Power
    80
    i have a script which is looking for local printers, actually - it is useds to delete all printers except local - buut it will give you the logic. will post it on monday.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 6th October 2010, 10:43 AM
  2. Replies: 17
    Last Post: 19th March 2010, 11:51 PM
  3. which printer drivers do you use?
    By projector1 in forum Windows
    Replies: 11
    Last Post: 21st May 2007, 01:38 PM
  4. Replies: 0
    Last Post: 5th April 2007, 12:44 PM
  5. Replies: 3
    Last Post: 1st March 2006, 12:08 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
  •