Multiple Printers

E

Elvis

Hi,

I currently have mutliple printer attached to an HP jet
direct print server. I was wondering how I would map
multiple printers to 1 workstation using a logon
script...All login script say I should start net use
lpt1: \\servername\sharename
When I use the ptinter wizard LPT1 is not
used.....instead the tcpip port name is used...is there
any way of mapping multiple printers to multiple
workstations without using LPT and using a login script?
Thanking You
Elvis
 
J

Jason Hall [MSFT]

--------------------
Sender: "Elvis" <[email protected]>
Subject: Multiple Printers
Date: Wed, 26 May 2004 07:23:04 -0700

Hi,

I currently have mutliple printer attached to an HP jet
direct print server. I was wondering how I would map
multiple printers to 1 workstation using a logon
script...All login script say I should start net use
lpt1: \\servername\sharename
When I use the ptinter wizard LPT1 is not
used.....instead the tcpip port name is used...is there
any way of mapping multiple printers to multiple
workstations without using LPT and using a login script?
Thanking You
Elvis
----------------------

The following script will add a TCP/IP port to a machine (just change the
IP address to suit):

Set objWMIService = GetObject("winmgmts:")
Set objNewPort = objWMIService.Get _
("Win32_TCPIPPrinterPort").SpawnInstance_
objNewPort.Name = "IP_157.57.80.15"
objNewPort.Protocol = 1
objNewPort.HostAddress = "157.57.80.15"
objNewPort.PortNumber = "9100"
objNewPort.SNMPEnabled = False
objNewPort.Put_


THEN, you can use scripting to add the printer(s). For usage, type the
following command at the Run box:
rundll32 printui.dll,PrintUIEntry /?


--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
E

Elvis

Hi Jason,

Thanks for the excellent and quick response...I have
changed the IP as you suggested.....I am able to ping
this printer...I copied your script to a text file and
changed the extension to VBS and double clicked on it
with the new IP...I get an error that looks like this
Line: 2
Char 1
Error: Not Found

Code 800041002
Source: SWbemServices
 
E

Elvis

Hi Jason,

After doing a little reading...this script only works for
Windows XP. I need a script like that for windows 2000.
Your help is greatly appreciated.
Thanking You

Elvis
 
J

Jason Hall [MSFT]

--------------------
Content-Class: urn:content-classes:message
From: "Elvis" <[email protected]>
Sender: "Elvis" <[email protected]>
References: <[email protected]>
<[email protected]>
Subject: RE: Multiple Printers
Date: Wed, 26 May 2004 10:18:22 -0700

Hi Jason,

After doing a little reading...this script only works for
Windows XP. I need a script like that for windows 2000.
Your help is greatly appreciated.
Thanking You
---------------------

I apologize. This script only works on XP and 2003.
If you want to script adding ports in 2K, you can use the Prnadmin.dll
functionality in the Windows 2000 Resource Kit

--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
E

Elvis

Hi Jason,

Thanks for that..I have found a registry file that will
create the printer port and I am using EMCO to push out
the registry files...so that part is done..now when I run
the" rundll32 printui.dll,PrintUIEntry /if /b "Xerox
DocuPrint N2125" /f %windir%\inf\ntprint.inf /r "<port
name>" /m "Xerox DocuPrint N2125" /Z "
It tells me that the drivers are incorrect, so I went
into the ntprint.inf file and can't find the docuprint
N2125 specified even though I have installed the drivers
locally....please advise if possible on how to use this
rundll32? Basically if the driver is not listed in
ntprint.inf then it won't install....how do I get
listings in the ntprint.inf file for printers not
mentioned there by default? I am using windows 2000 pro
for all workstations.
Thanking You
Elvis
 
J

Jason Hall [MSFT]

--------------------
Content-Class: urn:content-classes:message
From: "Elvis" <[email protected]>
Sender: "Elvis" <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: RE: Multiple Printers
Date: Thu, 27 May 2004 13:26:08 -0700
Lines: 59
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcREKNgieIaI7apiQjOURy+CttE9sw==
Newsgroups: microsoft.public.win2000.printing
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.win2000.printing:12749
NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
X-Tomcat-NG: microsoft.public.win2000.printing

Hi Jason,

Thanks for that..I have found a registry file that will
create the printer port and I am using EMCO to push out
the registry files...so that part is done..now when I run
the" rundll32 printui.dll,PrintUIEntry /if /b "Xerox
DocuPrint N2125" /f %windir%\inf\ntprint.inf /r "<port
name>" /m "Xerox DocuPrint N2125" /Z "
It tells me that the drivers are incorrect, so I went
into the ntprint.inf file and can't find the docuprint
N2125 specified even though I have installed the drivers
locally....please advise if possible on how to use this
rundll32? Basically if the driver is not listed in
ntprint.inf then it won't install....how do I get
listings in the ntprint.inf file for printers not
mentioned there by default? I am using windows 2000 pro
for all workstations.
Thanking You
Elvis
--------------------------

If you investigate the settings for rundll32 printui.dll,PrintUIEntry you
will see that you can specify an alternate .inf for the driver.

--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
E

Elvis

Hi Jason,

Thanks for your advice and patience. Thats exactly what I
did...I pointed the path to the oemsetup.inf and
everything worked great. I now have an automated printer
installation process. Thanks again.
Thanking You
Elvis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top