Results 1 to 3 of 3

Thread: Error code 87 when installing remote print drivers...

  1. #1
    MadKovalchuk17 Guest

    Error code 87 when installing remote print drivers...

    here is my code. Everytime I try to add a print driver, I get error
    code 87. I try to use \\ instead of \ in the driver path and inf and it still
    does not work. I am able to install a printer if the driver already exists on
    the remote machine, but if I have to install a driver, it will not work and
    returns error code 87. I have tried prndrvr.vbs as well and I can install the
    driver to the local workstation, but once I try remote, it does not work. Any
    ideas?

    objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer &
    "\root\cimv2")

    objDriver = objWMIService.Get("Win32_PrinterDriver")

    objWMIService.Security_.Privileges.AddAsString("SeLoadDriverPrivilege", True)

    objDriver.Name = "Lexmark E250dn"
    objDriver.SupportedPlatform = "Windows NT x86"
    objDriver.Version = "3"
    objDriver.FilePath =
    "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\"
    objDriver.Infname =
    "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\LMABJ740.inf"
    Dim intResult = objDriver.AddPrinterDriver(objDriver)

  2. #2
    Alan Morris [MSFT] Guest

    Re: Error code 87 when installing remote print drivers...

    error 87 is invalid parameter.

    I assume you've copied the driver files to the remote machine when using
    prndrvr.vbs. The install will fail if the driver files are not local to the
    remote 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.

    "MadKovalchuk17" <MadKovalchuk17@discussions.microsoft.com> wrote in message
    news:EFD3D140-20DF-4BF3-81A8-8D29B623864F@microsoft.com...
    > here is my code. Everytime I try to add a print driver, I get error
    > code 87. I try to use \\ instead of \ in the driver path and inf and it
    > still
    > does not work. I am able to install a printer if the driver already exists
    > on
    > the remote machine, but if I have to install a driver, it will not work
    > and
    > returns error code 87. I have tried prndrvr.vbs as well and I can install
    > the
    > driver to the local workstation, but once I try remote, it does not work.
    > Any
    > ideas?
    >
    > objWMIService = GetObject("winmgmts:" _
    > & "{impersonationLevel=impersonate}!\\" & strComputer &
    > "\root\cimv2")
    >
    > objDriver = objWMIService.Get("Win32_PrinterDriver")
    >
    > objWMIService.Security_.Privileges.AddAsString("SeLoadDriverPrivilege",
    > True)
    >
    > objDriver.Name = "Lexmark E250dn"
    > objDriver.SupportedPlatform = "Windows NT x86"
    > objDriver.Version = "3"
    > objDriver.FilePath =
    > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\"
    > objDriver.Infname =
    > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\LMABJ740.inf"
    > Dim intResult = objDriver.AddPrinterDriver(objDriver)




  3. #3
    MadKovalchuk17 Guest

    Re: Error code 87 when installing remote print drivers...

    If I have a user logged in on the remote machine that has mapped drives? I am
    still unable to get it copied. That should work, right?

    "Alan Morris [MSFT]" wrote:

    > error 87 is invalid parameter.
    >
    > I assume you've copied the driver files to the remote machine when using
    > prndrvr.vbs. The install will fail if the driver files are not local to the
    > remote 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.
    >
    > "MadKovalchuk17" <MadKovalchuk17@discussions.microsoft.com> wrote in message
    > news:EFD3D140-20DF-4BF3-81A8-8D29B623864F@microsoft.com...
    > > here is my code. Everytime I try to add a print driver, I get error
    > > code 87. I try to use \\ instead of \ in the driver path and inf and it
    > > still
    > > does not work. I am able to install a printer if the driver already exists
    > > on
    > > the remote machine, but if I have to install a driver, it will not work
    > > and
    > > returns error code 87. I have tried prndrvr.vbs as well and I can install
    > > the
    > > driver to the local workstation, but once I try remote, it does not work.
    > > Any
    > > ideas?
    > >
    > > objWMIService = GetObject("winmgmts:" _
    > > & "{impersonationLevel=impersonate}!\\" & strComputer &
    > > "\root\cimv2")
    > >
    > > objDriver = objWMIService.Get("Win32_PrinterDriver")
    > >
    > > objWMIService.Security_.Privileges.AddAsString("SeLoadDriverPrivilege",
    > > True)
    > >
    > > objDriver.Name = "Lexmark E250dn"
    > > objDriver.SupportedPlatform = "Windows NT x86"
    > > objDriver.Version = "3"
    > > objDriver.FilePath =
    > > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\"
    > > objDriver.Infname =
    > > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\LMABJ740.inf"
    > > Dim intResult = objDriver.AddPrinterDriver(objDriver)

    >
    >
    >


Similar Threads

  1. Replies: 5
    Last Post: 18-11-2013, 12:34 PM
  2. Unable to print on HP Officejet 5610xi, error code: 0x0000000d
    By Nazmin in forum Hardware Peripherals
    Replies: 5
    Last Post: 03-05-2011, 09:40 PM
  3. Replies: 3
    Last Post: 28-07-2010, 10:19 PM
  4. Error 0x00000003 & 0x00000578 installing print driver
    By Tyler McLaughlin in forum Vista Help
    Replies: 6
    Last Post: 26-05-2009, 06:14 AM
  5. Replies: 4
    Last Post: 01-11-2006, 10:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,875,218.92209 seconds with 17 queries