Sign in with
Sign up | Sign in
Your question

Installing network printer through batch file

Last response: in Windows XP
Share
Anonymous
October 28, 2004 5:35:39 PM

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
Anonymous
October 28, 2004 8:28:58 PM

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?FamilyI...
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
>
Anonymous
November 4, 2004 12:51:53 PM

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:o 6XAmXUvEHA.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?FamilyI...
> 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
> >
>
>
Related resources
Anonymous
November 7, 2004 12:36:51 AM

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:o 6XAmXUvEHA.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?FamilyI...
>> 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
>> >
>>
>>
>
>
Anonymous
October 5, 2012 3:05:34 PM

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

::D elete 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



!