Wednesday, May 4, 2011

How to make sure that all browser windows are closed ...

$u = ENV['USERNAME']
system("taskkill /T /F /IM iexplore.exe /FI \"USERNAME eq "+$u+"\"")
system("taskkill /T /F /IM firefox.exe /FI \"USERNAME eq "+$u+"\"")
system("taskkill /T /F /IM chrome.exe /FI \"USERNAME eq "+$u+"\"")

No comments:

Post a Comment