473,657 Members | 2,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Spooler File on Windows

I'm not sure if this is the right group to post this to, but here goes.
I need to find out the name of the print spool file for every job queued to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a program in
the Postscript language and readable. I need to read a few comments at the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo
Nov 15 '05 #1
3 8378
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsick ofspam.com> wrote in message
news:hK******** **************@ newssvr28.news. prodigy.com...
You could probably get that from the registry - probably something like
HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I can't check..

"Larry Maturo" <lm*****@austin .rr.com> wrote in message
news:eF******** **********@twis ter.austin.rr.c om...
I'm not sure if this is the right group to post this to, but here goes.
I need to find out the name of the print spool file for every job queued

to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a program in the Postscript language and readable. I need to read a few comments at

the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo


Nov 15 '05 #2
Yikes, this is looking worse and worse. I've never run across an API for
that - so again, the brute-force way - is you could write a service that
monitors the spool directory (filesystemwatc her).. and whenever a file is
added, you can handle it appropriately.. this would only really work if you
tracked every file that got spooled on that machine though... hope that
helps..

"Larry Maturo" <lm*****@austin .rr.com> wrote in message
news:VK******** ***********@twi ster.austin.rr. com...
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsick ofspam.com> wrote in message
news:hK******** **************@ newssvr28.news. prodigy.com...
You could probably get that from the registry - probably something like
HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I can't
check..

"Larry Maturo" <lm*****@austin .rr.com> wrote in message
news:eF******** **********@twis ter.austin.rr.c om...
I'm not sure if this is the right group to post this to, but here goes. I need to find out the name of the print spool file for every job
queued
to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a
program in the Postscript language and readable. I need to read a few comments

at the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo



Nov 15 '05 #3
Hi Frank,

I would love to do that, but the problem is that there are multiple
printers, and
I need to know which spool file goes with which printer. If the client buys
off
on adding registry keys and adding a seperate spool file directory for each
printer, then that's the route I'll go. If he dosen't buy off on that, I'm
looking for
an alternative solution. The point to this job is to track which printer a
particular
file got printed on, and tie it to the information in the spool file that
was added
as comments by the clients Print Processor. The normal print processor is
WinPrint, but you can add your own. That's what fax programs do. Because
the Print Processor is installed into the Windows print system, its in just
the
right place to do its magic. Unfortunately, the client did not pay for
source to
this component, and the people they paid to write it want a fortune to add
this
capability.

Again, thank you for your help.

-- Larry
"Frank Drebin" <no*****@imsick ofspam.com> wrote in message
news:eM******** **************@ newssvr28.news. prodigy.com...
Yikes, this is looking worse and worse. I've never run across an API for
that - so again, the brute-force way - is you could write a service that
monitors the spool directory (filesystemwatc her).. and whenever a file is
added, you can handle it appropriately.. this would only really work if you tracked every file that got spooled on that machine though... hope that
helps..

"Larry Maturo" <lm*****@austin .rr.com> wrote in message
news:VK******** ***********@twi ster.austin.rr. com...
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsick ofspam.com> wrote in message
news:hK******** **************@ newssvr28.news. prodigy.com...
You could probably get that from the registry - probably something like HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I

can't
check..

"Larry Maturo" <lm*****@austin .rr.com> wrote in message
news:eF******** **********@twis ter.austin.rr.c om...
> I'm not sure if this is the right group to post this to, but here

goes. > I need to find out the name of the print spool file for every job queued to
> a particular printer. I actually need to read a few lines from the
> spool file as well. The best I've been able to do so far is the name > of the original document, without a path to it. To get that far I had > to import some functions from winspool.
>
> By the way, the spooled data is Postscript, so it actually is a program
in
> the Postscript language and readable. I need to read a few comments

at the
> top of the file, which in Postscript are any lines starting with "%". >
> -- Larry Maturo
>
>



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5069
by: nhmark64 | last post by:
Hi, How do wait for a print spooler to be empty? My application sucks up all the CPU cycles after i print some reports. I want to delay the CPU intensive stuff until after the print spooler finishes. Thanks, Mark
0
364
by: RDI | last post by:
I need to watch a certain print spooler and if a print job appears, extract the print data to a PRN file on the hard disk and delete it from the spooler. Can VB.Net do this? If so, can someone point me in the right direction please? -- RDI
9
2724
by: Scott M | last post by:
I'm printing a directory of about 500 multi-page tifs to a high speed printer and the spooler process is killing me!!! here is a little code..... Public Function PrintImage(ByVal SourceFile As String) As Boolean Try
1
1891
by: =?Utf-8?B?QXVzdGluIFN0ZXBoZW5z?= | last post by:
In my commercial financial application I run a deposit report. I use an option to copy the report to the Clipboard. I then run a .NET consol app to “grab” the Clipboard and format the data and print laser deposit tickets. I use the following to set my printer: PrintDocument doc = new PrintDocument(); if (printer != "default") doc.PrinterSettings.PrinterName = printer; I then raise an event: doc.PrintPage += new...
1
1757
by: =?Utf-8?B?c2hlaWxh?= | last post by:
i have a lexmark series 1200 printer that was working fine untill we installed a new ink cartridge since then we have not been able to use printer have tried all listed solutions from run services start spooler to uninstalling and trying to reinstall printer show that spooler is started but when i try to install priner it always comes back saying cant install print spooler not working any suggestions as to what i can do now thanks --...
1
2864
by: =?Utf-8?B?c2hlaWxh?= | last post by:
i have a lexmark 1240 printer changed ink cartridge printer has not worked since have tried going to run services print spooler hitting automatic then start shows spooler started when i go back to reinstall printer get error can not install spooler not running what else can i try -- sheila
1
1154
by: =?Utf-8?B?QmV3aWxkZXJlZA==?= | last post by:
Among other issues with my printer spooler. I received the follwoing message. SPOOLSV.EXE Application error The instruction at "0x73001347" referenced memory at "0x0074169a". The memory can not be read. Can someone advise?
1
1894
by: =?Utf-8?B?ZGF2aWR0aGV3ZWI=?= | last post by:
I have a recurring issue with a Print Spooler on a Windows 2000 Server. A print job will get stuck and take a large amount of the CPU time. I stop the print spooler in Services, go into Windows (or Winnt) | System32 | Spool | Printers and delete all jobs in that folder and restart the print spooler. This fixes the issue temporarily, but several days later, the same process occurs. Is there a way to trace where the stuck print job is...
0
1721
by: =?Utf-8?B?Sm9obg==?= | last post by:
If I'm posting in the wrong group please let me know. We've been experiencing issues with the print spooler service on our print server running Windows Server 2003 SP2. Occasionally the service will fail without any specific errors. In the event viewer there will be the following error, event ID 7031 "The Print Spooler service terminated unexpectedly. It has done this 2 time(s). The following corrective action will be taken in 60000...
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.