Announcement

Collapse
No announcement yet.

Printer script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printer script

    I want to use the following printer script on my network, but I have windows 2003 standard ed x64 bit servers and x32 bit servers as well. Both of my AD's are X64 bit. When I run my script on my Win XP Pro x32 it fails

    'PrintersLong.vbs - Windows Logon Script.
    Set objnetwork = CreateObject("WScript.Network")
    objNetwork.AddwindowsPrinterConnection "\\bmp-fs01\CUST SERVICE"
    objNetwork.AddwindowsPrinterConnection "\\bmp-fs01\EXEC ADMIN"
    objNetwork.AddwindowsPrinterConnection "\\bmp-fs01\SALES"
    objNetwork.AddwindowsPrinterConnection "\\bmp-fs01\SERVICE CENTER"
    objNetwork.AddwindowsPrinterConnection "\\bmp-fs01\TRAINING RM"

    Error:

    Script: \\BMP-FS01\HOME$\acampos\printer.vbs
    Line: 3
    char: 1
    error: the printer name is invalid
    code: 8007079
    source: (null)

  • #2
    Re: Printer script

    Is the script running under the logged-on user's security context?
    Are the additional x86 drivers for the printers available on the x64 version of Windows? (modified INF file, see: http://download.microsoft.com/downlo...atform_INF.doc)

    The error stated that no network printer by that PRINTER NAME can be found on the server. Can you test the same script but then using the sharename (printer unc-path) of the printers instead of the printer name, to check if the script is able find the printers that way.


    \Rems
    Last edited by Rems; 14th April 2009, 17:48.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: Printer script

      Originally posted by Rems View Post
      Is the script running under the logged-on user's security context?
      Are the additional x86 drivers for the printers available on the x64 version of Windows? (modified INF file, see: http://download.microsoft.com/downlo...atform_INF.doc)

      The error stated that no network printer by that PRINTER NAME can be found on the server. Can you test the same script but then using the sharename (printer unc-path) of the printers instead of the printer name, to check if the script is able find the printers that way.


      \Rems

      Thanks but that document is a bit long with procedures.

      now in theory if I place all the printers on a x32 bit server my script should work because all of the users are on xp x32.

      I want to place the script in the start up just like I do with my logon.bat file.

      Comment


      • #4
        Re: Printer script

        One thing you could try is to add the x86 printer drivers to the x64 server:
        Download and unpack the printer drivers for the 32-bit OS to a share on the network.
        use "prndrvr.vbs" to install the printer driver on the server:
        Code:
        cscript.exe %windir%\system32\prndrvr.vbs -a -m "Printer Model name according to the inf file" -v 3 -h "\\server\share" -i "\\server\share\drv1file.inf" -e "Windows NT x86"
        ! for the exact syntax for "prndrvr.vbs" see: http://technet.microsoft.com/en-us/l.../cc754632.aspx
        note, if you are running x64 print Server you’ll need to install the x64 driver on it before you can add the printer.

        Alternatively, you can also use:
        rundll32 printui.dll,PrintUIEntry /ia /m "Printer Model name according to the inf file" /h ...
        ! printui help will give you the options for accessing printui interfaces using rundll32.


        An other option that might work is to install the driver on the clients before the userlogon script is connecting the network printer.
        In this case, since Users can only install a printer driver as part of adding a network printer, you'll have to install the drivers during computer startup. (related subject: http://forums.petri.com/showthread.p...731#post103731)



        \Rems

        [EDIT]
        Related thread(s):
        Print Server - Need Multiple Drivers
        _
        Last edited by Rems; 3rd July 2010, 12:04.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment

        Working...
        X