Install Printer Locally via Script

qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
I already have a logon script that adds my network printers but recently we found out that their is a huge performance difference when we I go to the desktop and install it as a local printer with a static port.

Does anybody know of a batch or VBS script that will do that?

FYI im running on a Windows Server 2003 Domain and this script would be for my Windows XP and Windows 7 machines.

Comments

  • ClaymooreClaymoore Member Posts: 1,637
    Group policy preferences will allow you to deploy TCP/IP printers but you will need at least one 2008 DC and the client side extensions installed on your XP boxes.
  • qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
    Claymoore wrote: »
    Group policy preferences will allow you to deploy TCP/IP printers but you will need at least one 2008 DC and the client side extensions installed on your XP boxes.

    That would be a great solution but unfortunately we dont have any plans to upgrade to a 2008 domain until 2003 reaches end of life for support.
  • qcomerqcomer Member Posts: 142
    qwertyiop wrote: »
    I already have a logon script that adds my network printers but recently we found out that their is a huge performance difference when we I go to the desktop and install it as a local printer with a static port.

    Does anybody know of a batch or VBS script that will do that?

    FYI im running on a Windows Server 2003 Domain and this script would be for my Windows XP and Windows 7 machines.



    <!
    Remotely install network printer for local users
    rundll32 printui.dll,PrintUIEntry /ga /c\\[computername] /n\\[server]\[shared printer]


    <!
    Stop and Start Print Spooler
    sc [URL="file://\\"]\\[/URL][computername] stop spooler
    sc [URL="file://\\"]\\[/URL][computername] start spooler

    This will install a network printer as a "local" printer on a per-machine basis. This is prewritten assuming you have a print server of some sort.

    Triggers in broad terms.
    /ga adds the printer "per-machine"
    /y makes default
    /gd deletes printer "per-machine"
    /c remote computer (unc path)
    /n printer name (unc path to printer)

    Let me know if you need any help with it.

    To see more about it, open up CMD PROMPT and run
    rundll32 printui.dll PrintUIEntry /?
  • crrussell3crrussell3 Member Posts: 561
    Windows XP includes printer scripts that you can use to do this. prnport, prndrvr, prnmgmr, etc.
    MCTS: Windows Vista, Configuration
    MCTS: Windows WS08 Active Directory, Configuration
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    What does your logon script look like? Have a look here for other suggestions.
Sign In or Register to comment.