How to close the browser after successful execution of .bat file automatically -
here have .bat file script execute program automatically in chrome browser. working expected.
@echo off start /d "c:\program files (x86)\google\chrome\application" chrome.exe filepath.php but after successful execution of script browser should close automatically. how achieve ? appreciated.
well there 2 scenarios:
- you kill process after successful execution of php script. in case, php script, call:
$result= shell_exec('taskkill /f /im "chrome.exe"'); - if want kill process regardless of happens inside php script, kill bat file directly using:
taskkill /f /im "chrome.exe"
Comments
Post a Comment