How to add a printer port on Windows 2000 via script

P

ProblemChild

We are aware that you can add a tcp/ip printer port via
prnport.vbs on Windows XP and Windows 2003 machines.
However, we need to script this for Windows 2000
Professional Workstations.

Found some references to look in the 2000 Resources Kit
but could not find it in there.

Could anyone post wehre I could download this script OR
sample script for me to use please?

Thanks a lot.....!!!!
 
J

Jason Hall [MSFT]

--------------------
Content-Class: urn:content-classes:message
From: "ProblemChild" <[email protected]>
Sender: "ProblemChild" <[email protected]>
Subject: How to add a printer port on Windows 2000 via script
Date: Thu, 22 Apr 2004 09:07:17 -0700

We are aware that you can add a tcp/ip printer port via
prnport.vbs on Windows XP and Windows 2003 machines.
However, we need to script this for Windows 2000
Professional Workstations.

Found some references to look in the 2000 Resources Kit
but could not find it in there.

Could anyone post wehre I could download this script OR
sample script for me to use please?

Thanks a lot.....!!!!
---------------------

Here is a sample vbs script I keep on hand, just change the IP address as
needed:

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_


--
~~ 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.
 
J

Jason Hall [MSFT]

--------------------
Content-Class: urn:content-classes:message
From: "ProblemChild" <[email protected]>
Sender: "ProblemChild" <[email protected]>
References: <[email protected]>
<r#[email protected]>
Subject: RE: How to add a printer port on Windows 2000 via script

You Rock.... This is what I was looking for...

Thanks a lot.

-------

No problem, glad I could help.


--
~~ 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.
 

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