Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Closing A Program With BASIC/Batch
Name: DaleSwanson Date: August 20, 2005 at 03:32:21 Pacific OS: Win2k CPU/Ram: P4
Comment:
I would like to know how I can close a program using either BASIC or a batch file. I know you can open with SHELL in BASIC, I'm basicly looking for the opposite of that.
Name: wizard-fred Date: August 20, 2005 at 05:27:49 Pacific
Reply:
Unless a program is designed for it, there is no graceful way of closing it. BASIC and batch files are essentially single threaded. Once started it expects to come to an end at predefined points under control of the program. At best you can stop the program (Ctrl-Alt_Delete) but the point where the program is running is unknown.
0
Response Number 2
Name: DaleSwanson Date: August 20, 2005 at 09:14:31 Pacific
Reply:
Hmmm, maybe I wasn't quite clear. I want to stop another program not the QBASIC/batch one.
0
Response Number 3
Name: uli_glueck Date: August 21, 2005 at 22:24:10 Pacific
Reply:
The NT - Ressource Kit has a Command line tool called kill.exe. It should work in Win2K also. (To list the processes use tlist.exe. Also in the ressource kit).
uli
0
Response Number 4
Name: Shr0Om Date: August 23, 2005 at 07:08:54 Pacific
Reply:
You can kill a program with the command taskkill. Here is an example of how you kill notepad: taskkill /IM notepad.exe
Just save this in a .bat or a .cmd file.
0
Response Number 5
Name: Shr0Om Date: August 23, 2005 at 07:09:38 Pacific
Reply:
Ahh, taskkill is used in WinXp.. Dunno if it works in w2k.
0
Response Number 6
Name: wizard-fred Date: August 25, 2005 at 23:00:13 Pacific
Reply:
Killing an application might be fine if it is not doing anything important. If the application is sending or receiving data, or is a database organizing data then there has to be a method of notifying the original caller of the program that the process was interupted. Note that you may lose data if you doing an inplace sort using ram for temporary storage.
Summary: i am trying to use c++ to make a program that will close another file/program when open. i am using Dev-c++ to write it. i have no idea how to aproach this, and i havent been able to find anything on ...
Summary: Hey, Just have a quick question, My batch file won't call the program I tell it to. I tell it CALL C:\programfiles\blah\blah.exe and nothing happens.. any ideas of what is wrong? ...
Summary: I would like to develop an executable program which will open a program, check(or uncheck) a check box and them close the program. Anyone have any ideas how to begin this program, ie. what language w...