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

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
1 answer Last reply
More about create standard port printer means
  1. 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=/library/en-us/dnanchor/html/anch_wmi.asp
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_printer.asp
    microsoft.public.windows.server.scripting

    http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx
    http://www.microsoft.com/technet/scriptcenter/scripts/printing/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
Ask a new question

Read More

Configuration TCP/IP Printers Windows XP