Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Check if windows program is running ====== <code bash> @echo off SET IMA=0 tasklist /FI "IMAGENAME eq APP Executable.exe" /FO csv > c:\sched\csv.tmp FOR /F "usebackq tokens=1 delims=," %%A IN (csv.tmp) DO ( if %%A == "APP Executable.exe" ( SET IMA=1 ) ) IF %IMA% == 1 ( if not exist c:\sched\Notified ( rem Do something touch c:\sched\Notified ) del c:\sched\Notified_E ) else ( if not exist c:\sched\Notified_E ( rem Do something touch c:\sched\Notified_E ) del c:\sched\Notified ) :end del c:\sched\csv.tmp </code> windows/scripting/check_if_program_is_running.txt Last modified: 2020/06/01 14:27by 127.0.0.1