Re: AddPrinterDriver return error 87 HELP!!!
From: Tal. (anonymous_at_discussions.microsoft.com)
Date: 03/26/04
- Next message: Micky G: "Get a list of available classes on an OS dynamically"
- Previous message: AOUser: "Re: 16-bit process"
- In reply to: Hox Nathalie: "Re: AddPrinterDriver return error 87 HELP!!!"
- Next in thread: gv: "Re: AddPrinterDriver return error 87 HELP!!!"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 04:14:01 -0800
This error 87 has nothing to do with VBScript or WMI!
>-----Original Message-----
>http://custom.lab.unb.br/pub/asme/PASCAL/ take the
Error87.zip
><anonymous@discussions.microsoft.com> a écrit dans le
message de news:
>11cef01c410ca$9379fca0$a401280a@phx.gbl...
>> I am tring to add printer driver with WMI.
>> It always return error 87 which is not documented
anywhere
>>
>> PLEASE HELP!!!
>>
>> Here is my code:
>>
>> strComputer = "."
>> Set objWMIService = GetObject("winmgmts:" & _
>> "{impersonationLevel=impersonate}!\\" & strComputer
>> & "\root\cimv2")
>> Set objDriver = objWMIService.Get
("Win32_PrinterDriver")
>> objDriver.Name = "hp LaserJet 1300 PCL6"
>> objDriver.SupportedPlatform = "Windows NT x86"
>> objDriver.Version = "3"
>> objDriver.FilePath = "D:\1300N_PLC6"
>> objDriver.InfName = "D:\1300N_PLC6\hp1300m6.inf"
>> intResult = objDriver.AddPrinterDriver(objDriver)
>> WScript.Echo intResult
>>
>
>
>.
>
- Next message: Micky G: "Get a list of available classes on an OS dynamically"
- Previous message: AOUser: "Re: 16-bit process"
- In reply to: Hox Nathalie: "Re: AddPrinterDriver return error 87 HELP!!!"
- Next in thread: gv: "Re: AddPrinterDriver return error 87 HELP!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|