Force windows spool file use jobid as its name

Source: Internet
Author: User
Tags spl

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.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.