Force Windows spool file use jobid as its name

來源:互聯網
上載者:User

On Windows NT/2000 you will find the files by name xxxx.spl where xxxx was the JobID returned by the EnumJobs API. However, Windows XP/2003 create spool files named FPxxxx.spl where xxxx is no longer the JobID.

This is the side effect of file pooling, not a bug. You can “turn off” Spool File Pooling by keeping printed jobs or specify a different spool directory. The workaround to this is as below:
To Turn Off Spool File Pooling on a Per Printer Queue-Basis

   1. Click Start, click Run, type regedit in the Open box, and then click OK.
   2. Locate the following registry subkey, where <printername> is the name of your printer: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Print/Printers/<printername>
   3. In the right pane, right-click SpoolDirectory, and then click Modify.
   4. In the Value data box, type the location where you want the spool files to be stored. For example, type c:/windows/system32/spool/printers as the default location.
   5. Quit Registry Editor.
   6. Restart the Print Spooler service.

All new jobs will be of the form xxxx.SPL xxxx.SHD and will be numbered consistently with their JobIDs.
To Turn Off Spool File Pooling for All Printers

Note: This method only works on Windows 2003 Server. This method does not work for Windows XP.

   1. Click Start, click Run, type regedit in the Open box, and then click OK.
   2. Locate the following registry subkey: HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print
   3. On the Edit menu, point to New, and then click DWORD Value.
   4. In the New Value #1 box, type DisableServerFilePooling, and then press ENTER.
   5. Right-click DisableServerFilePooling, and then click Modify.
   6. In the Value data box, type 1 to turn off spool file pooling, and then click OK.
   7. Quit Registry Editor.
   8. Restart the Print Spooler service.

All new jobs will be of the form XXXXX.SPL and XXXXX.SHD and will be numbered consistently with their JobIDs.
 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

Tags Index: