Sign in with
Sign up | Sign in
Your question

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

Last response: in Windows XP
Share
Anonymous
June 22, 2005 8:49:02 AM

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

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
September 1, 2005 3:54:21 PM

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

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/default.asp?url=/libr...
http://msdn.microsoft.com/library/default.asp?url=/libr...
microsoft.public.windows.server.scripting

http://www.microsoft.com/technet/scriptcenter/scripts/d...
http://www.microsoft.com/technet/scriptcenter/scripts/p...

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
!