+ Post New Thread
Results 1 to 9 of 9
Scripts Thread, Set default printer in Coding and Web Development; I have a windows 2003 R2 SP2 server and our network has a mix of xp and windows 7. I ...
  1. #1

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Set default printer

    I have a windows 2003 R2 SP2 server and our network has a mix of xp and windows 7. I am trying to use a script to set the default printer on computers based on the OU the computers are in. I have tried applying it as a startup script and as a login script - with no success. I can log into a computer and manually run the script, so I know it isn't an error in the script. Can anyone help me with what I am missing?

    I have also tried it with a copier named CopierC... in case it had something to do with the hyphens or the long name.

    I have used different variations of the script, but this is the current one:

    ' Set default printer
    Option Explicit
    Dim objPrinter
    Set objPrinter = CreateObject("WScript.Network")
    objPrinter.SetDefaultPrinter "\\library-server\HPLJ-P2035n-C103"

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,233
    Thank Post
    218
    Thanked 813 Times in 695 Posts
    Rep Power
    274
    is the printers name and share name the same?
    ive found them being diff can cause issues

  3. #3

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    They are the same.

  4. #4

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I forgot to add... I am trying to run the script using group policies on the Win2003 server.

  5. #5

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,714
    Thank Post
    269
    Thanked 1,116 Times in 1,012 Posts
    Rep Power
    345
    Quote Originally Posted by sgagne View Post
    I forgot to add... I am trying to run the script using group policies on the Win2003 server.
    Try Group Policy Preferences from a windows 7 machine works really well. To run on xp you need to put push printer connections on a login screen

  6. #6

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by glennda View Post
    Try Group Policy Preferences from a windows 7 machine works really well. To run on xp you need to put push printer connections on a login screen
    I have seen this suggested on several websites, however when I go into the local group policies on the Windows 7 Professional laptop, the options shown online are not available on this computer. They actually look like the XP group policies with the only options under User Configuration are: Software Settings, Windows Settings and Administrative Templates - I don't see the "preferences" option shown on the web.

    Also, I do have pushprinterconnections.exe running at login on the XP machines, this however does not set up a default printer - not that I am aware of anyway. Printers are pushing out and installing okay. I just can't designate a default printer.

    Our setup is awkward. Our DCs are Win2003, but my print queue that I am using is on a Win2008 server (Not an DC). Clients are a mix of XP (32-bit) and Win7 (32 and 64 bit). I don't know if this is adding to my problem. Printers are all pushing okay for the most part. I just can't find a way to set a default printer on either the XP or Win7 machines.

    Thanks!

  7. #7

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I may have just found what I need - installing gp preferences on win 2003 domain. I will post back if this works!

  8. #8
    TheLibrarian
    Guest
    For Windows XP try con2prn.

  9. #9

    Join Date
    Dec 2010
    Posts
    6
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks for the suggestion - I am not so concerned with the xp machines as the default profile holds this setting... and at this point, as we are phasing them out, I think I will stick to that for the xp. It is more critical in the Windows 7 machines which don't.

    I was able to get the group policy management updated with client side extensions, but even after adding the printer as the default, it doesn't work. They seem to just default to XPS Document Writer.

SHARE:
+ Post New Thread

Similar Threads

  1. Unable to set default printer
    By SimpleSi in forum Windows
    Replies: 5
    Last Post: 6th September 2012, 09:08 AM
  2. Set Default printer according to computers OU
    By Pyroman in forum Scripts
    Replies: 8
    Last Post: 21st July 2009, 08:11 PM
  3. Problem setting default printers
    By Kyle in forum Windows
    Replies: 2
    Last Post: 10th April 2008, 10:49 AM
  4. Set Default Printer to Machines with Local Printers
    By Heebeejeebee in forum Windows
    Replies: 15
    Last Post: 5th February 2007, 03:00 PM
  5. Cannot set default printer Server 2003
    By tosca925 in forum Windows
    Replies: 2
    Last Post: 26th August 2005, 03:49 PM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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