Installing network printer through batch file

Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

Hello all,

I'm looking to see if I can install an IP Port printer through a batch file.

Long story, short. Half of our office prints throug a Cannon ir5000i, w/
the print queue on the network (so they all already have the driver
installed). They are moving to a new office w/ a new subnet. I have a
batch file I've written to speed up the network protocols change over, and
would like to be able to tackle the printer as well. Also, the clients will
now print directly through the Cannons internal print server, so I need to
configure them as IP Ports.

Can this be done? Any suggestions?

Thanks In Advance,
Eric James Dreksler
4 answers Last reply
More about installing network printer batch file
  1. Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

    I'm not aware of a way to create a Standard TCP/IP printer port via script,
    but you might want to see if the Print Migrator tool at
    http://www.microsoft.com/downloads/details.aspx?FamilyID=9b9f2925-cbc9-44da-b2c9-ffdbc46b0b17&DisplayLang=en
    is any help.


    --
    Bruce Sanderson MVP

    It is perfectly useless to know the right answer to the wrong question.


    "Eric Dreksler" <ericd AT accessoneinc DOT com> wrote in message
    news:uKpfzyRvEHA.3276@TK2MSFTNGP15.phx.gbl...
    > Hello all,
    >
    > I'm looking to see if I can install an IP Port printer through a batch
    > file.
    >
    > Long story, short. Half of our office prints throug a Cannon ir5000i, w/
    > the print queue on the network (so they all already have the driver
    > installed). They are moving to a new office w/ a new subnet. I have a
    > batch file I've written to speed up the network protocols change over, and
    > would like to be able to tackle the printer as well. Also, the clients
    > will now print directly through the Cannons internal print server, so I
    > need to configure them as IP Ports.
    >
    > Can this be done? Any suggestions?
    >
    > Thanks In Advance,
    > Eric James Dreksler
    >
  2. Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

    in \windows\system32 there is prnport.vbs use this to create the port.

    You can also use prndrvr and prnmngr to add the driver and printer

    works on XP and above.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Bruce Sanderson" <bsanders@junk.junk> wrote in message
    news:O6XAmXUvEHA.720@TK2MSFTNGP10.phx.gbl...
    > I'm not aware of a way to create a Standard TCP/IP printer port via
    script,
    > but you might want to see if the Print Migrator tool at
    >
    http://www.microsoft.com/downloads/details.aspx?FamilyID=9b9f2925-cbc9-44da-b2c9-ffdbc46b0b17&DisplayLang=en
    > is any help.
    >
    >
    > --
    > Bruce Sanderson MVP
    >
    > It is perfectly useless to know the right answer to the wrong question.
    >
    >
    > "Eric Dreksler" <ericd AT accessoneinc DOT com> wrote in message
    > news:uKpfzyRvEHA.3276@TK2MSFTNGP15.phx.gbl...
    > > Hello all,
    > >
    > > I'm looking to see if I can install an IP Port printer through a batch
    > > file.
    > >
    > > Long story, short. Half of our office prints throug a Cannon ir5000i,
    w/
    > > the print queue on the network (so they all already have the driver
    > > installed). They are moving to a new office w/ a new subnet. I have a
    > > batch file I've written to speed up the network protocols change over,
    and
    > > would like to be able to tackle the printer as well. Also, the clients
    > > will now print directly through the Cannons internal print server, so I
    > > need to configure them as IP Ports.
    > >
    > > Can this be done? Any suggestions?
    > >
    > > Thanks In Advance,
    > > Eric James Dreksler
    > >
    >
    >
  3. Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

    Thanks Alan. I'll see about getting this added to the Printing FAQ.

    --
    Bruce Sanderson MVP

    It is perfectly useless to know the right answer to the wrong question.


    "Alan Morris(MSFT)" <alanmo@online.microsoft.com> wrote in message
    news:eMaf6bpwEHA.2016@TK2MSFTNGP15.phx.gbl...
    > in \windows\system32 there is prnport.vbs use this to create the port.
    >
    > You can also use prndrvr and prnmngr to add the driver and printer
    >
    > works on XP and above.
    >
    > --
    > Alan Morris
    > Windows Printing Team
    > Search the Microsoft Knowledge Base here:
    > http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    > "Bruce Sanderson" <bsanders@junk.junk> wrote in message
    > news:O6XAmXUvEHA.720@TK2MSFTNGP10.phx.gbl...
    >> I'm not aware of a way to create a Standard TCP/IP printer port via
    > script,
    >> but you might want to see if the Print Migrator tool at
    >>
    > http://www.microsoft.com/downloads/details.aspx?FamilyID=9b9f2925-cbc9-44da-b2c9-ffdbc46b0b17&DisplayLang=en
    >> is any help.
    >>
    >>
    >> --
    >> Bruce Sanderson MVP
    >>
    >> It is perfectly useless to know the right answer to the wrong question.
    >>
    >>
    >> "Eric Dreksler" <ericd AT accessoneinc DOT com> wrote in message
    >> news:uKpfzyRvEHA.3276@TK2MSFTNGP15.phx.gbl...
    >> > Hello all,
    >> >
    >> > I'm looking to see if I can install an IP Port printer through a batch
    >> > file.
    >> >
    >> > Long story, short. Half of our office prints throug a Cannon ir5000i,
    > w/
    >> > the print queue on the network (so they all already have the driver
    >> > installed). They are moving to a new office w/ a new subnet. I have a
    >> > batch file I've written to speed up the network protocols change over,
    > and
    >> > would like to be able to tackle the printer as well. Also, the clients
    >> > will now print directly through the Cannons internal print server, so I
    >> > need to configure them as IP Ports.
    >> >
    >> > Can this be done? Any suggestions?
    >> >
    >> > Thanks In Advance,
    >> > Eric James Dreksler
    >> >
    >>
    >>
    >
    >
  4. This is an addition to below comment:

    -----------------------------
    in \windows\system32 there is prnport.vbs use this to create the port.

    You can also use prndrvr and prnmngr to add the driver and printer

    works on XP and above.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "
    -------


    the full command then becomes:


    set server=SERVER0397
    set port=c:\reports1.ps
    set printer=DocuColor1
    set driver=Xerox 24X/25X/260 PS

    print "%driver%"


    pushd C:\Windows\System32\Printing_Admin_Scripts\en-US

    ::delete printer
    cscript prnmngr.vbs -d -p %printer% -s %server%
    ::add port
    cscript prnport.vbs -a -s %server% -h %server% -r %port% -o raw
    ::add local printer
    cscript prnmngr.vbs -a -p %printer% -m "%driver%" -r %port%

    ::list printers and connections
    cscript prnmngr.vbs -l -s %server%

    popd

    Good luck

    EREY
Ask a new question

Read More

Network Printer Windows XP