Close a DOS program automatically
Posted on 2003-03-17
I've seen that this question has been asked by others but I can't seem to get any of the comments to those questions to work in my situation. I know little about VB, but I really need to find a way to get my DOS program closed.
At night I run macros in my DOS database(Q&A version 4.0 DOS). I do this simply by opening the program via windows task scheduler and with the correct command line suffix, the macros run and then the program closes - the macros end on the program's main menu and the keystroke to close the program from here is "X".
My problem is that only one copy of the program can be open at once, so if someone forgets to close it at the end of the day (which tends to happen alot), the macros will not run - it will try but then abort and give a message that the program is already open.
What I need is a small exe file that I can open with my task scheduler just before my macros are set to run to check if the program is open and close it if it is. The command line is C:\QA4\QA.COM.
As I mentioned I don't know VB very well, but I have worked with ACCESS a fair bit. I have Visual Basic 6.0 from what I can tell, it looks similar to ACCESS in that I would need to create a form with some code attached to it, then compile it into a exe file?? Could someone confirm this process? I'm pretty sure that with some help with the code and a general idea as to how to create a VB prject I will be on my way.
Thanks in advance