PRB: You Receive Error Message If You Use AddWindowsPrinterConnection Method to Add Printers Using Windows Script Host File (297454)
The information in this article applies to:
- Microsoft Windows Script Host 1.0
- Microsoft Windows Script Host 2.0
This article was previously published under Q297454 SYMPTOMS
If you try to use the AddWindowsPrinterConnection method to add printers to Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me) clients, you may receive one of the following errors messages:
Error: 80070705 The printer driver is unknown.
Error: 8007070A The printer already exists.
CAUSE
This behavior can occur in Windows Script Host if either of the following conditions are true: - The printer driver is not installed when you use the AddWindowsPrinterConnection method in a script.
- Two or more installed printers use the same printer driver. The AddWindowsPrinterConnection method uses the printer driver name for the printer name.
RESOLUTION
There is no script workaround for either problem. However, you can use a custom Component Object Model (COM) or Win32 Dynamic-link Library (DLL) to resolve this problem.
Win32 DLLs allow the script to run on a local computer and reference the DLL on a remote share. This is very helpful in the case of a login script, where thousands of clients need to use the DLL but the administrator does not want to deploy the DLL. Samples of Win32 DLLs have been tested in scenarios that resulted in the error messages listed in the "Symptoms" section. For more information on these tests, see the "References" section.
STATUS
This behavior is by design.
REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
297888 SAMPLE: Drvsrv.dll Installs a Windows Printer Driver from a Print Server
300518 SAMPLE: Rename Printers via Windows Script Host
For more information on the AddWindowsPrinterConnection Method, see the following Microsoft Web page:
Modification Type: | Minor | Last Reviewed: | 3/20/2004 |
---|
Keywords: | kbDSWManage2003Swept kbprb KB297454 |
---|
|