Microsoft windows print spooler

Перезапуск сервера печати (print spooler)

Итак, опишем проблему с сервисом печати (print spooler) на сервере, в крупной фирме, где есть много разномастных принтеров, подключенных в терминальном режиме.

0. Суть ошибки

Эта проблема появляется в остановке сервиса печати при работе в терминале с удаленного офиса. Ошибка происходит в терминале и принтер перестает принимать документы на печать, при чем на сервере появляется «клон» принтера, и на нем начитается выстраиваться очередь на печать, а фактически печать документов не происходит.

1. Причины ошибки

Происходит ошибка в очереди печати, или если возникла ошибка при печати на принтере, либо при отмене какого-нибудь документа, либо после небольшого разрыва связи, либо при отправке документов одновременно несколькими пользователями на печать. Тогда начинается паника в офисе, а если еще и нужно срочно распечатать какой-нибудь отчет, начинаются звонки сисадминам, с криками: «СПАСИТЕ. ПОМОГИТЕ. НЕВОЗМОЖНО РАБОТАТЬ. ДА КОГДА ЖЕ ЭТО ВСЕ ПРЕКРАТИТСЯ. » — и т. д. Вот сейчас мы и опишем, как можно исправить данную неприятность в операционных системах семейства Windows.

2. Решение

Решается данная проблема перезапуском сервера печати, т. е. службы prints pooler. (Подробно о службе prints pooler можно прочитать вот здесь). Чтоб перезапустить данную службу (как и любую другую) необходимо выполнить 2 команды:

Если операцию приходится выполнять периодически, удобнее создать «костыль» в виде файла c расширением «.bat», проще говоря «батника».

Откроем простой блокнот (удобнее всего использовать программу NotePad++) и напишем там 2 вышеназванные строчки. Сохраним этот файл, поставив расширение .bat вместо .txt, назвав его «перезапуск службы печати» или как нибудь еще, как удобнее. При запуске этого файла будет происходить перезапуск службы печати.

На скриншоте выше добавлен оператор pause в конце что бы показать работу bat-файла.

Смотрите также:

Microsoft SQL Server 2012 / 2008 включает в себя 9 предопределенных серверных ролей. Данные роли определены на уровне сервера и поэтому существуют вне баз данных. Они предусмотрены для удобства администрирования MS…

Для групповой разработки конфигурации в системе «1С:Предприятия» 8.3 используется хранилище конфигурации. Доступ разработчиков к хранилищу конфигурации может осуществляться по локальной сети (файлы базы данных располагаются на общем сетевом ресурсе), по протоколу…

IIS (Internet Information Services) – один из немногих штатных инструментов Windows, которым можно пользоваться, не ища более приемлемых альтернатив от других разработчиков. Веб-сервер IIS с поддержкой языка PHP можно использовать…

Microsoft-Windows-Printing-Spooler-Core

The Microsoft-Windows-Print-Spooler-Core is used to configure actions that the print spooler service performs when the computer starts. The print spooler actions will occur whenever the print spooler service is restarted. This includes system restart, user login, and manual restart of the print spooler service.

This setting has no effect on Server Core installations of Windows ServerВ 2008, Windows ServerВ 2008В R2, and Windows ServerВ 2012.

Читайте также:  Не открывается меню установки windows

In This Section

Setting Description
RemoveMPDW Specifies whether to remove the Microsoft Print to PDF print queue and driver package from a Windows installation.
RemoveMXDW Specifies whether to remove the Microsoft XPS Document Writer (MXDW) print queue and driver package from a Windows installation.
Start Indicates whether the spooler autologger will start by default when the system boots.

Applies To

To determine whether a component applies to the image you’re building, load your image into Windows SIM and search for the component or setting name. For information on how to view components and settings, see Configure Components and Settings in an Answer File.

Print Spooler API Functions

The Print Spooler API contains the functions and data structures that applications use to manage the Windows print spooler and the printers and print jobs that it controls.

The functions of the Print Spooler API are divided into the following groups:

These functions send print jobs to a printer and track and control the print jobs in the print spooler.

Function Description
AddJob The AddJob function adds a print job to the list of print jobs that can be scheduled by the print spooler. The function retrieves the name of the file you can use to store the job.
ClosePrinter The ClosePrinter function closes the specified printer object.
DocumentEvent The DocumentEvent function is an event handler for events associated with printing a document.
DocumentProperties The DocumentProperties function retrieves or modifies printer initialization information or displays a printer-configuration property sheet for the specified printer.
EndDocPrinter The EndDocPrinter function ends a print job for the specified printer.
EndPagePrinter The EndPagePrinter function notifies the print spooler that the application is at the end of a page in a print job.
EnumJobs The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
GetJob The GetJob function retrieves information about a specified print job.
OpenPrinter The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem.
OpenPrinter2 Retrieves a handle to the specified printer, print server, or other types of handles in the print subsystem, while setting some of the printer options.
ReportJobProcessingProgress Reports to the Print Spooler service whether an XPS print job is in the spooling or the rendering phase and what part of the processing is currently underway.
ScheduleJob The ScheduleJob function requests that the print spooler schedule a specified print job for printing.
SetJob The SetJob function pauses, resumes, cancels, or restarts a print job on a specified printer. You can also use the SetJob function to set print job parameters, such as the print job priority and the document name.
StartDocPrinter The StartDocPrinter function notifies the print spooler that a document is to be spooled for printing.
StartPagePrinter The StartPagePrinter function notifies the spooler that a page is about to be printed on the specified printer.

Printer User Interface Functions

These functions display a user interface that enables the user to select or configure a printer.

Function Description
AdvancedDocumentProperties The AdvancedDocumentProperties function displays a printer-configuration dialog box for the specified printer, allowing the user to configure that printer.
ConfigurePort The ConfigurePort function displays the port-configuration dialog box for a port on the specified server.
ConnectToPrinterDlg The ConnectToPrinterDlg function displays a dialog box that lets users browse and connect to printers on a network. If the user selects a printer, the function attempts to create a connection to it; if a suitable driver is not installed on the server, the user is given the option of creating a printer locally.
PrinterProperties The PrinterProperties function displays a printer-properties property sheet for the specified printer.

Printer Functions

These functions add and configure the printers that the print spooler uses.

Function Description
AbortPrinter The AbortPrinter function deletes a printer’s spool file if the printer is configured for spooling.
AddPrinter The AddPrinter function adds a printer to the list of supported printers for a specified server.
AddPrinterConnection The AddPrinterConnection function adds a connection to the specified printer for the current user.
AddPrinterConnection2 Adds a connection to the specified printer for the current user and specifies connection details.
DeletePrinter The DeletePrinter function deletes the specified printer object.
DeletePrinterConnection The DeletePrinterConnection function deletes a connection to a printer that was established by a call to AddPrinterConnection or ConnectToPrinterDlg.
DeletePrinterData The DeletePrinterData function deletes specified configuration data for a printer. A printer’s configuration data consists of a set of named and typed values. The DeletePrinterData function deletes one of these values, specified by its value name.
DeletePrinterDataEx The DeletePrinterDataEx function deletes a specified value from the configuration data for a printer. A printer’s configuration data consists of a set of named and typed values stored in a hierarchy of registry keys. The function deletes a specified value under a specified key.
DeletePrinterKey The DeletePrinterKey function deletes a specified key and all its subkeys for a specified printer.
EnumPrinterData The EnumPrinterData function enumerates configuration data for a specified printer.
EnumPrinterDataEx The EnumPrinterDataEx function enumerates all value names and data for a specified printer and key.
EnumPrinterKey The EnumPrinterKey function enumerates the subkeys of a specified key for a specified printer.
EnumPrinters The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
FlushPrinter The FlushPrinter function sends a buffer to the printer in order to clear it from a transient state.
GetDefaultPrinter The GetDefaultPrinter function retrieves the printer name of the default printer for the current user on the local computer.
GetPrinter The GetPrinter function retrieves information about a specified printer.
GetPrinterData The GetPrinterData function retrieves configuration data for the specified printer or print server.
GetPrinterDataEx The GetPrinterDataEx function retrieves configuration data for the specified printer or print server. GetPrinterDataEx can retrieve values stored by the SetPrinterData function. In addition, GetPrinterDataEx can retrieve values stored under a specified key by the SetPrinterDataEx function.
IsValidDevmode The IsValidDevmode function verifies that the contents of a DEVMODE structure are valid.
ReadPrinter The ReadPrinter function retrieves data from the specified printer.
ResetPrinter The ResetPrinter function specifies the data type and device mode values to be used for printing documents submitted by the StartDocPrinter function. These values can be overridden by using the SetJob function after document printing has started.
SetDefaultPrinter The SetDefaultPrinter function sets the printer name of the default printer for the current user on the local computer.
SetPort The SetPort function sets the status associated with a printer port.
SetPrinter The SetPrinter function sets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.
SetPrinterData The SetPrinterData function sets the configuration data for a printer or print server.
SetPrinterDataEx The SetPrinterDataEx function sets the configuration data for a printer or print server. The function stores the configuration data under the printer’s registry key.
WritePrinter The WritePrinter function notifies the print spooler that data should be written to the specified printer.

Printer Change Notification Functions

These functions enable an application to be notified of changes to a printer’s status.

Function Description
FindClosePrinterChangeNotification The FindClosePrinterChangeNotification function closes a change notification object created by calling the FindFirstPrinterChangeNotification function. The printer or print server associated with the change notification object will no longer be monitored by that object.
FindFirstPrinterChangeNotification The FindFirstPrinterChangeNotification function creates a change notification object and returns a handle to the object. You can then use this handle in a call to one of the wait functions to monitor changes to the printer or print server.
FindNextPrinterChangeNotification The FindNextPrinterChangeNotification function retrieves information about the most recent change notification for a change notification object associated with a printer or print server. Call this function when a wait operation on the change notification object is satisfied.
FreePrinterNotifyInfo The FreePrinterNotifyInfo function frees a system-allocated buffer created by the FindNextPrinterChangeNotification function.

Printer Form Functions

These functions manage the forms used by a printer.

Function Description
AddForm The AddForm function adds a form to the list of available forms that can be selected for the specified printer.
DeleteForm The DeleteForm function removes a form name from the list of supported forms.
EnumForms The EnumForms function enumerates the forms supported by the specified printer.
GetForm The GetForm function retrieves information about a specified form.
SetForm The SetForm function sets the form information for the specified printer.

These functions interact with the print spooler at a low level.

Читайте также:  Комбинация клавиш для удаления windows
Оцените статью