I want to write a batch file to keep checking every 20 seconds if firefox is open, if open then there is no action required. if firefox is closed, the batch file needs to force open it on a certain webpage. this also needs to be a silent batch..
I've tried this so far:
@echo off
Set WShShell = WScript.CreateObject("WScript.Shell")
tasklist /fi "firefox.exe" 2>NUL | find /i /n "firefox.exe">NUL
if %ERRORLEVEL%==1 goto nofirefox
cmd /C start firefox.exe -new-tab "google.com"