For some reason I cannot get this batch to perform the open portion, wait, then the close portion in Windows XP or Windows 7. I can only open or close by commenting out the other in the batch, but for some reason how I have it written it will only open. How can I open a program wait a fixed time, then close that same program? The reason for doing this is to force a manufacturer program's drivers when the computer starts. Any help would be much appreciated. Thanks.
@ECHO off
"C:\Program Files\WinTV\WinTV2K.EXE" -nc
Set _Delay=5
Taskkill /IM "WinTV2K.EXE" /F
Exit