adding printing ports & printers systematically on x64 Windows 2003 R2

Discussion in 'Windows 64bit' started by Eric, Jun 13, 2007.

  1. Eric

    Eric Guest

    I would like to script the creation of 50+ printers on a new x64 R2
    Windows 2003 server. That includes 50 ports, with 50 printers shared
    out. (using VB script or PowerShell)

    For this task, I normally use a script (vbscript) I wrote which used
    PRNADMIN.DLL. (works great remotely or locally on a x32 server)

    However, I've been unsuccesful adding ports and printers using the
    same script on an x64 server. (both remotely and locally) - (remotely
    was using a x32 client)

    The scripts, prndrvr.vbs & prnport.vbs, (as supplied with the install
    of 2003 x64 R2), also do NOT work.

    I HAVE been successful in using RUNDLL32 PRINTUI.DLL,PrintUIEntry to
    add the printers, (and even install the drivers), but it only works
    LOCALLY on the x64 server, (which is ok i suppose), but the problem
    is, I can't figure out how to add the local TCP/IP ports.

    So, the short and simple question is:

    Can anyone tell me how to add TCP/IP ports to a x64 2003 R2 server
    using Vbscript or command line?

    -Eric

    ps - (WMI doesn't work either)
     
    Eric, Jun 13, 2007
    #1
    1. Advertisements

  2. prndrvr.vbs and prnport.vbs work fine on x64

    WMI only allows signed driver installation so if unsigned drivers are used
    prndrvr.vbs will not work on x86 or x64.

    WMI also does not support cluster names so the vbs scripts in system32 must
    be targeted against a non clustered machine



    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Alan Morris [MSFT], Jun 13, 2007
    #2
    1. Advertisements

  3. Eric

    Eric Guest

    Thanks Alan for the reply! (very good info)

    However, maybe you can help with this. (and the reason why I stated
    originally that prnport.vbs doesn't work on x64)

    When I tried prnport.vbs on the x64 test machine, (not a node cluster)
    I used this syntax: (exactly what was printed in the sample)

    cscript prnport.vbs -a -r IP_1.2.3.4 -h 1.2.3.4

    I get the following out:

    Unable to create/update port IP_1.2.3.4 Error 0x80041008 Invalid
    parameter.

    Thoughts?

    Any further help would be appreciated!

    -Eric

    PS - Also, any thought of someone recompiling PRNADMIN to x64? :)
     
    Eric, Jun 13, 2007
    #3
  4. Yes that is exactly the same error on x86

    G:\>prnport -a -r IP_1.2.3.4 -h 1.2.3.4
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Unable to create/update port IP_1.2.3.4 Error 0x80041008 Invalid parameter



    When the IP does not exist or not yet on the network, you will need to
    specify the protocol and LPR queue name for the device. If the device is
    not included in tcpmon.ini you may also need to pass in the device
    configuration to the script.

    G:\>prnport -a -r IP_1.2.3.4 -h 1.2.3.4 -o raw
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Created/updated port IP_1.2.3.4

    G:\>prnport -a -r IP_5.6.7.8 -h 5.6.7.8 -o lpr -q LPTPASSTHRU
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Created/updated port IP_5.6.7.8

    PS. I'll ping you at the gmail address with x64 prnadmin.dll information.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Alan Morris [MSFT], Jun 14, 2007
    #4
  5. Eric

    Eric Guest

    Very nice. Thanks.

    I guess I've been so used to using my prnadmin script I forget how to
    not use it.

    I look forward to any additoinal information you have via my gmail
    email regarding x64 prnadmin

    -E
     
    Eric, Jun 14, 2007
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.