I currently have a .bat file that I run through Windows Task Scheduler that consists of the following:
start http://.../script.php
SLEEP 60
taskkill /im /f "C:\Program Files (x86)\Internet Explorer\iexplore.exe"
What I intend to do is run the script, wait a minute because it takes some time to complete, then kill any Internet Explorer processes that are running in the background to avoid wasting resources. I've already tried setting up a task that just runs the script with php.exe, but that one didn't work. The only thing the .php script does is update a database table. I've checked the task manager every time I've run this thing and the iexplore.exe processes still remain. While I was waiting to post this, I tried modifying the .bat file as follows:
start http://.../script.php
SLEEP 60
taskkill.exe /im /f iexplore.exe /t
Though this seemed to have some effect in that no iexplore.exe processes were running, the script failed to run as well. I tried removing /t at the end of the third line but this failed to yield any results.
The system adds iexplore.exe*32 processes every time after the first run, and I'm not sure how to kill them properly. I need this whole thing to run automatically, without any need for a user to close windows or confirm anything. What am I doing wrong?