开发者

Windows Print Spool Location Variable

My mom's printer acts strangely sometimes and screws up, won't print and then can't delete, stop, restart, or anything any documents in the spool. I wrote a python program that stops the print spooler service, empties the spool folder, and then turns print spooler serv开发者_Python百科ice back on. Currently the location of the print spool folder is hard coded into the program.

My question is is there a system or environment variable that is common to the various flavors of windows that returns where the spool folder is at? Or can that folder even be changed from the default such that I shouldn't even worry about it?


Looks like the spool directory is specific to each printer (and it can be changed). You can get it via GetPrinterData with SPLREG_DEFAULT_SPOOL_DIRECTORY.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜