I am running the following batch script:
@echo off
tasklist /nh /fi "Windowtitle eq Export to PDF - DOORS" | find /i "Export to PDF - DOORS" >nul && (
echo PDF is running
) || (
echo PDF is not running
)
This only echos “PDF is running” if the window is currently active. Perhaps I am using the wrong command (tasklist). Is there a way to find in the full list of open windows?
I was able to get what I needed with a VB Script (Thanks @JoshGuzman for the idea):
Then call the VB script with
wscript myScript.vbsfrom the command prompt or a batch file.