I'm struggling a bit with this. The idea of the script should be:
If program 1 is running Close it then open it If not running Do nothing
This will be used on XP and win7 machines
Here's what I have, but I have no idea how to incorporate the if statements or even if what I have is remotely correct:
tasklist /fi "imagename eq KDS.exe" taskkill /f /im "KDS.exe" start "" "C:\Path\KDS.exe"