I have a challenging problem.
my requirement for batch script,
- check whether Firefox browser is running..
- And if it is running batch script will play a music.
- Script will stay awake until browsing session completes & user closes the browser. (Script will never exits ever since system booted up until the shutdown. Means always stay awake to play the music each & every time user opens up Firefox browser)
Following is the script I've written,
@echo off
: loop
tasklist /fi "imagename eq Firefox.exe" |find ":" > nul
if errorlevel 1 (start "C:\Program Files\KMPlayer 64X\KMPlayer64" "C:\Users\UserName\Desktop\Apple.mp3") else (goto loop)
// no exit
This script only runs for the first time and it does not loop. Can anybody help?