cd %commander_path%\tools
if exist "%programfiles%\Foxit Software\Foxit Reader\Foxit Reader.exe" (goto foxreader) else goto checkphantom

:checkphantom
if exist "%programfiles%\Foxit Software\Foxit Phantom\Foxit Phantom.exe" (goto foxphantom) else goto adobe

:foxreader
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Path" "%programfiles%\Foxit Software\Foxit Reader\Foxit Reader.exe"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Params" "/p ~x25L~x25"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "MaxFiles" "1"
..\addons\tcmc emem_batchprintpdf
exit

:foxphantom
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Path" "%programfiles%\Foxit Software\Foxit Phantom\Foxit Phantom.exe"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Params" "/p ~x25L~x25"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "MaxFiles" "1"
..\addons\tcmc emem_batchprintpdf
exit

:adobe
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Path" "%COMMANDER_PATH%\TOOLS\NirCMD.EXE"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "Params" "exec hide PDFP ~x25L~x25"
nircmd inisetval ..\addons\totaleditor\batchprintpdf.ini "PDF" "MaxFiles" "9999"
..\addons\tcmc emem_batchprintpdf
exit