Summary: It is possible, and actually fairly simple, to check for a running process to determine whether file updates can be executed.
Discussion: Running processes can be identified using NetInstall’s WMI capabilities.
The following script shows how to find an instance of a running notepad.exe and wait for it to be terminated.
: Check Set('WMI_ProcessId','') WMISimpleQuery('\\.\root\cimv2','Win32_Process','Caption=notepad.exe','wmi_') ProcessId ! Check whether the WMI Result is empty (no process found) If not %WMI_ProcessId%='' Sleep('5') ! Loop Till result is empty goto Check MsgBox Notepad is no longer running EndProc
Note: You must add the 'Win32_Process' class when creating the WMI Simple Query command.