Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get control of a printer driven by an executable program

Posted on 2004-08-12
3
Medium Priority
?
223 Views
Last Modified: 2010-04-12
An application (executable file) allows printing the results of user input.  However, the app seems to use a temporary print file that doesn't get deleted after printing (and the next user gets the print from the original user.)  We can make this work by manually deleting the printfile after each user but seems like a clumsy way to do things.

The printer is BJC 4400--looking at the manual I don't see any printer control codes available.

The app also uses Irfanview viewer (not embedded in the app so we could set some options there I think--but don't think this has anything to do with the printing).

Is there some way to start a batch file after each print to delete the temp print file?  (I don't have access to the source code for the app.)

Or some other way to get this job done?

Thanks, Lyle
0
Comment
Question by:Faurot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 39

Assisted Solution

by:hdhondt
hdhondt earned 500 total points
ID: 11789114
Assuming your application runs in a DOS window, it is very easy to use a batch file that first runs the application and then deletes the data file. Using a text editor (e.g. Notepad) create a file called RUNMYAPP.BAT

Type the following as the contents of the file:
C:\PathToApp\Appname.exe
DEL C:\PathToDataFile\DataFile

where PathToApp, etc, are replaced with the real path to the application, etc.

Now, instead of double-clicking your application, double-click RUNMYAPP.BAT

Remember this will ONLY work if your app runs from a DOS prompt; if it is a WIndows application I cannot give any guarantees.
0
 
LVL 8

Accepted Solution

by:
thoffman earned 500 total points
ID: 11804925
I thought Irfanview was a Windows-only program. If so, and you're running under windows, you'd be better off getting a device context to the printer and use the proper printing APIs to let Windows handle all the spooling. If you didn't write this program, I'd be curious to know why an app with access to Windows wouldn't just use the APIs.

What operating system are you running? Where are these temporary files, and what are they called? There should be a way to automatically delete them, but the answer depends on the OS and what the files are.
0
 

Author Comment

by:Faurot
ID: 11820199
hdhondt and thoffman,

Thanks for your input.

I split the points to give you both credit for attempting to help with this problem.  

As it turns out, the program itself has problems that probably will require the programmers to address in the source code (which I don't have access to.)

Thanks, Lyle
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use a Brother DCP 130C or similar Brother printer, at some point you might encounter the following problem: after you change the ink cartridge, the printer displays an "ink empty" message. Sometimes you just need to follow the instructions…
This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question