Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Closing...  (Read 1992 times)

0 Members and 1 Guest are viewing this topic.

Learning

  • Guest
Closing...
« on: July 12, 2006, 07:17:33 PM »
 :-? how do you close a specific active program using dos? tskill will close all of the instances - but i only want to kill one -  ie. two notepad text files are open but i want to close only the first....

-- i want to implement this in a C++ prog by using the system command, might make things easier...

DosItHelp



    Intermediate
    Re: Closing...
    « Reply #1 on: July 12, 2006, 07:36:56 PM »
    It's easier in C++ by using FindWindow to get the window handle and then posting a WM_QUIT message to the window.

    However using CMD you might want to run: TSKILL processid
    by replacing the processid ID with the process id of the process you want to terminate.

    Hope this helps.
    « Last Edit: July 12, 2006, 07:37:12 PM by DosItHelp »

    Learning

    • Guest
    Re: Closing...
    « Reply #2 on: July 12, 2006, 08:02:44 PM »
    --- well then that project idea is toast...

    well then for a secruity program like the one microsoft gives an example for in their scheduled tasks, how do you prevent it from simply being closed...