SAMPLE: Rename Printers via Windows Script Host (300518)
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 Q300518 SUMMARY Due to limitations in Windows Script Host, there is no
method to rename printers once they have been created. For Windows 95/Windows
98 clients the problem is exacerbated because the AddWindowsPrinterConnection
method uses the printer driver name for the printer name. This causes a problem
if more than one printer that uses the same driver must be added. This article
provides source code (Renprinter_source.exe) for a sample Win32 dynamic link
library (DLL) called Renprinter.dll that implements the following Win32 APIs:
OpenPrinter
GetPrinter
SetPrinter
ClosePrinter
This DLL can be called from script, and a sample is included with
the source.
Modification Type: | Minor | Last Reviewed: | 8/9/2004 |
---|
Keywords: | kbdownload kbDSWManage2003Swept kbfile kbhowto KB300518 kbAudDeveloper |
---|
|