@echo off c: cd\ dir /s/b FrameworkService.exe >c:\NAlocation.txt for /F "tokens=*" %%I in (c:\NAlocation.txt) do call :DOTHEWORK "%%I" goto :EOF :DOTHEWORK echo %1 netsh firewall add allowedprogram %1 networkassociates enable custom 128.208.2.202 goto :eof