Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
In the Windows operating system, managing printers is a common task for both end-users and system administrators. One of the key components that facilitate printer management is the Dynamic Link Library (DLL) file known as printui.dll. This library provides a set of functions and user interface elements for managing printers and printer drivers. Understanding how to use printui.dll can significantly streamline printer management tasks, especially in environments with multiple printers.
In this article, we will explore how to use printui.dll to manage printers via the Command Prompt (CMD). We will cover practical examples, including adding, deleting, and listing printers, as well as managing printer drivers.
Examples:
1. Adding a Printer
To add a printer using printui.dll, you can use the following command in CMD:
rundll32 printui.dll,PrintUIEntry /if /b "Printer Name" /f "C:\Path\To\Driver.inf" /r "PortName" /m "Printer Model"
Explanation:
/if
: Installs a printer driver./b "Printer Name"
: Specifies the name of the printer./f "C:\Path\To\Driver.inf"
: Specifies the path to the printer driver file./r "PortName"
: Specifies the port name./m "Printer Model"
: Specifies the printer model.2. Deleting a Printer
To delete a printer, use the following command:
rundll32 printui.dll,PrintUIEntry /dl /n "Printer Name"
Explanation:
/dl
: Deletes a printer./n "Printer Name"
: Specifies the name of the printer to be deleted.3. Listing All Printers
To list all printers installed on the system, you can use the following command:
rundll32 printui.dll,PrintUIEntry /s /t1
Explanation:
/s
: Opens the Print Server Properties./t1
: Displays the list of printers.4. Adding a Printer Driver
To add a printer driver, use the following command:
rundll32 printui.dll,PrintUIEntry /ia /m "Printer Model" /h "x64" /v "Type 3 - User Mode" /f "C:\Path\To\Driver.inf"
Explanation:
/ia
: Installs a printer driver./m "Printer Model"
: Specifies the printer model./h "x64"
: Specifies the architecture (x64 or x86)./v "Type 3 - User Mode"
: Specifies the driver type./f "C:\Path\To\Driver.inf"
: Specifies the path to the driver file.5. Removing a Printer Driver
To remove a printer driver, use the following command:
rundll32 printui.dll,PrintUIEntry /dd /m "Printer Model" /h "x64" /v "Type 3 - User Mode"
Explanation:
/dd
: Deletes a printer driver./m "Printer Model"
: Specifies the printer model./h "x64"
: Specifies the architecture./v "Type 3 - User Mode"
: Specifies the driver type.