@echo off set mozcertutil=\\fileserver\Sysadmin\nss\certutil.exe set cafile=\\fileserver\Sysadmin\ca.pem set caname=My Certificate Authority :: NOTE: appdata\mozilla\firefox but appdata\thunderbird. for /d %%d in ("%appdata%\mozilla\firefox\profiles\*" "%appdata%\thunderbird\profiles\*") do ( "%mozcertutil%" -A -n "%caname%" -t "TCu,TCu,TCu" -i "%cafile%" -d "%%d" )