How to create a standard TCP/IP port for printer by means of...?

Posted: 06-22-2005, 12:49 PM
Hi,

I want to create and configure a standard tcp/ip port on my workstations for
a specific printer by means of commands and a batch file and not its wizard.
Is it possible? If it is what are the commands?

Thanks,
Bijan
Reply With Quote

Responses to "How to create a standard TCP/IP port for printer by means of...?"

Joseph
Guest
Posts: n/a
 
Re: How to create a standard TCP/IP port for printer by means of...?
Posted: 09-01-2005, 11:54 AM
Check out documentation relating to WMI - Stick this in a VBS file and run
from a BAT file.

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewPort = objWMIService.Get _
("Win32_TCPIPPrinterPort").SpawnInstance_

objNewPort.Name = "IP_169.254.110.14"
objNewPort.Protocol = 1
objNewPort.HostAddress = "169.254.110.14"
objNewPort.PortNumber = "9999"
objNewPort.SNMPEnabled = False
objNewPort.Put_

http://msdn.microsoft.com/library/de...l/anch_wmi.asp
http://msdn.microsoft.com/library/de...32_printer.asp
microsoft.public.windows.server.scripting

http://www.microsoft.com/technet/scr...s/default.mspx
http://www.microsoft.com/technet/scr...g/default.mspx

Joseph
IT Analyst

"Bijan Kianifard" <BijanKianifard@discussions.microsoft.com> wrote in
message news:93699C90-3944-489B-B120-72D5D102DB49@microsoft.com...
> Hi,
>
> I want to create and configure a standard tcp/ip port on my workstations
> for
> a specific printer by means of commands and a batch file and not its
> wizard.
> Is it possible? If it is what are the commands?
>
> Thanks,
> Bijan

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can not create a new network print port on windows vista fondac Windows Vista Printers & Scanners 2 05-18-2007 05:03 AM
Should I create a standard user account for my home pc? zigner Windows Vista Administration 1 03-23-2007 02:23 PM
Create virtual port serie and map bluetooth device to this port Jérôme MATHIEU Windows XP Device Drivers 0 10-11-2004 11:13 AM
Does anyone know what this means Peter Windows XP Network & Web 1 07-28-2003 09:33 PM
Anyone know what this is/means?? Curtis Windows XP Security & Administration 1 07-28-2003 07:39 AM