+ Post New Thread
Results 1 to 4 of 4
Windows Thread, Default printer script in Technical; This has probably been asked many a times but can't seem to find an answer. Currently printers are added via ...
  1. #1

    sippo's Avatar
    Join Date
    May 2008
    Location
    Swindon, Wiltshire
    Posts
    1,758
    Thank Post
    138
    Thanked 201 Times in 140 Posts
    Rep Power
    156

    Default printer script

    This has probably been asked many a times but can't seem to find an answer.

    Currently printers are added via script apart from one ICT suite. The Black one is on the print server, the colour one is added via directly to the IP of the printer.

    Is there a script command to set the black as default?

    The desktops are XP and we're on Server 2003.

    Thanks y'all.

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,092
    Thank Post
    891
    Thanked 1,742 Times in 1,502 Posts
    Blog Entries
    12
    Rep Power
    456
    This VBS script will set the default printer. You maybe can use this or include it in your existing script

    Code:
    Option Explicit
    Dim network
    Set Network = CreateObject("Wscript.Network")
    Network.SetDefaultPrinter "\\printserver\printershrednamed"
    If you want to use it with local attached printers:


    Code:
    Option Explicit
    Dim network
    Set Network = CreateObject("Wscript.Network")
    Network.SetDefaultPrinter "printername"

  3. 2 Thanks to FN-GM:

    sippo (23rd March 2011), siuko (6th July 2011)

  4. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,092
    Thank Post
    891
    Thanked 1,742 Times in 1,502 Posts
    Blog Entries
    12
    Rep Power
    456
    Also the way we deploy our printer it takes a few seconds for the printer to show up. so i put a sleep in there to give the printer time to install first.

  5. #4
    wiggum123's Avatar
    Join Date
    May 2010
    Location
    Bristol
    Posts
    58
    Thank Post
    13
    Thanked 2 Times in 2 Posts
    Rep Power
    9
    We have a pretty good script that runs here using con2prt

    You set all the printers at the top of the script, they can be anywhere really but all of ours are on a print server. Then you connect the printers at the bottom using either usernames or computernames using /CD to set default and /C to just add one, leaving the default as it is. We used to have an environment variable in there too but that is now obselete.
    Here is a shortened version of our script

    Code:
    @echo off && CLS
    Title Printer Setup Program
    
    FOR /F "tokens=1,* delims=-" %%F IN ("%Computername%") DO set Computer=%%F
    FOR /F "tokens=3,* delims=." %%F IN ("%username%") DO set user=%%F
    cls
    echo Computer Name is %Computer% && echo Room ID is %Room% && echo User Name is %username%  && echo End of UserName is %user%
    
    IF NOT EXIST "%systemroot%\con2prt.exe" Copy "\\shared\Scripts\files\con2prt.exe" "%systemroot%\con2prt.exe"
    
    set PrinterServer=\\printers
    set con2prt=%systemroot%\con2prt.exe
    
    Title Printer - Configuring
    
    :: Art
    set ArtUpper="%PrinterServer%\ART_Upper_CYM"
    set ArtLower="%PrinterServer%\ART_Lower_CYM"
    etc....
    :: Art
    IF "%Username%" == "username of someone"		"%con2prt%" /CD %ArtUpper% /C %ArtLower% /C %ArtLowerA3%

SHARE:
+ Post New Thread

Similar Threads

  1. Printer Preferences - local default printer
    By Simcfc73 in forum Windows Server 2008 R2
    Replies: 11
    Last Post: 9th May 2011, 10:43 AM
  2. Replies: 14
    Last Post: 29th October 2009, 06:14 PM
  3. Replies: 13
    Last Post: 20th February 2008, 04:29 PM
  4. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  5. Cunning 'default printer' script
    By ajbritton in forum Scripts
    Replies: 2
    Last Post: 12th November 2006, 09:22 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
  •