This topic has not yet been rated - Rate this topic

RenamePrinter method of the Win32_Printer Class

Applies to: desktop apps only

The RenamePrinter WMI class method renames a printer.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax

uint32 RenamePrinter(
  [in]  string NewPrinterName
);

Parameters

NewPrinterName [in]

New printer name.

Return value

Return codeDescription
0

Success

5

Access Denied

1801

Invalid Printer Name

 

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

Cimwin32.mof

DLL

Cimwin32.dll

See also

Computer System Hardware Classes
Win32_Printer

 

 

Send comments about this topic to Microsoft

Build date: 3/9/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ