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:

  1. you kill process after successful execution of php script. in case, php script, call:

$result= shell_exec('taskkill /f /im "chrome.exe"'); 
  1. if want kill process regardless of happens inside php script, kill bat file directly using:

taskkill /f /im "chrome.exe" 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -