Results 1 to 3 of 3
  1. #1
    Eric S

    How do I check if a SPECIFIC Dos program is open?

    I have an Access 97 database and "shell" out to a Dos program to import data from the serial port (proprietary app). I need to know how (In Access VBA code) to check and see:

    1. If the Dos program is still running or not. Checking for any Dos box being open would work just as well as there are no other Dos box apps ever running.

    B. How to shut it down. Keep it mind when shutting down a Dos program that is open you get a dialog box asking if you are sure if you want to terminate because you might lose data (blah, blah, blah..). So I also need to (in code) avoid or answer this box "yes" so it shuts down.

    This problem has plagued me for a couple years now so "Good Luck"!

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: How do I check if a SPECIFIC Dos program is open?

    Hi Eric,

    Check out these articles that describe using API calls for your needs:

    API: Find out if an application is currently running

    API: Close another Application

    Hope this helps

  3. #3
    Eric S

    Re: How do I check if a SPECIFIC Dos program is open?

    Well! This is the closest I have gotten yet. The MS-Dos box class is called "tty". ALL Ms-Dos sessions open are called that. I still have that same problem with the dialog box. The one that asks if I am sure I want to close it because I might lose information. I've tried to Sendkeys but it does not work. Any idea how to answer this box with a "yes" or send an ALT-Y to answer and close the box?
    Thanks again for your help. Worst case scenario I guess I could have the user just click the "yes" button. Cludgy but effective.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts