Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Server Scripting
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags:

Error code 87 when installing remote print drivers...

Server Scripting


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-12-2007
MadKovalchuk17
 
Posts: n/a
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("Se LoadDriverPrivilege", True)

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

Reply With Quote
  #2  
Old 11-12-2007
Alan Morris [MSFT]
 
Posts: n/a
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("Se LoadDriverPrivilege",
> True)
>
> objDriver.Name = "Lexmark E250dn"
> objDriver.SupportedPlatform = "Windows NT x86"
> objDriver.Version = "3"
> objDriver.FilePath =
> "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KX P\\"
> objDriver.Infname =
> "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\L MABJ740.inf"
> Dim intResult = objDriver.AddPrinterDriver(objDriver)




Reply With Quote
  #3  
Old 29-01-2008
MadKovalchuk17
 
Posts: n/a
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("Se LoadDriverPrivilege",
> > True)
> >
> > objDriver.Name = "Lexmark E250dn"
> > objDriver.SupportedPlatform = "Windows NT x86"
> > objDriver.Version = "3"
> > objDriver.FilePath =
> > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KX P\\"
> > objDriver.Infname =
> > "C:\\lexmark\\Drivers\\Drivers\\Print\\Win_2KXP\\L MABJ740.inf"
> > Dim intResult = objDriver.AddPrinterDriver(objDriver)

>
>
>


Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Server Scripting


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Error code 87 when installing remote print drivers..."
Thread Thread Starter Forum Replies Last Post
Error 0x00000003 & 0x00000578 installing print driver Tyler McLaughlin Vista Print and Fax 6 26-05-2009 06:14 AM
Problem installing Lexmark x4650 - error 0x000006be, Print Spooler, Add Printer AndyW68 Vista Print and Fax 7 20-10-2008 09:25 PM
error 39 while installing drivers for usb cam psykid Hardware Peripherals 9 11-08-2008 05:13 PM
Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers ejmichaud@hotmail.com XP Print Fax 7 01-11-2006 09:58 PM
Installing drivers for e-home (Microsoft) remote AFTER install of HeinePaul MediaCenter 14 26-07-2005 10:46 PM


All times are GMT +5.5. The time now is 07:45 PM.