Reputation: 543
I have a simple batch script on the server that opens an instance of chrome and a url address using some javascript as well.
The above is working fine but I am then trying to close the browser after 30 seconds.
I have installed PSKill but my batch code is not working.
Do I have to specify the full path or something to the pskill.exe file?
Thanks for all relevant replies.
@echo off
start chrome.exe javascript:document. http://google.com
TIMEOUT 30
PSKILL chrome.exe
Upvotes: 0
Views: 6210
Reputation: 157
taskkill /F /IM chrome.exe /T > nul
"> nul" needs to suppress error messages, preventing getting roped into a dialog
Upvotes: 1