Mike Lewis
Programmer
This might be more of a DOS question than Windows, but I'll ask here first.
When performing certain maintenance tasks, I need to close all the programs currently running on the system. It seems that the DOS [tt]taskkill[/tt] command will be suitable for this. So I have created a batch file as follows:
This works as far as it goes. But I don't necessarily know in advance which programs will be running, so I need a way of closing every program that happens to be running at the time. I would have thought I could use a wildcard, something like this:
but this doesn't work. It typically gives the message "The process *.* is not found". I've tried various other combinations of wildcards and switches, but all without success.
Any help would be appreciated.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
When performing certain maintenance tasks, I need to close all the programs currently running on the system. It seems that the DOS [tt]taskkill[/tt] command will be suitable for this. So I have created a batch file as follows:
Code:
taskkill /f /im thunderbird.exe
taskkill /f /im postbox.exe
taskkill /f /im firefox.exe
etc. etc.
This works as far as it goes. But I don't necessarily know in advance which programs will be running, so I need a way of closing every program that happens to be running at the time. I would have thought I could use a wildcard, something like this:
Code:
taskkill /f /im *.*
but this doesn't work. It typically gives the message "The process *.* is not found". I've tried various other combinations of wildcards and switches, but all without success.
Any help would be appreciated.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads