Command line Anti-Virus format
Question asked by John Quest - Today at 3:03 PM
Unanswered
With the change to the AV command line on build 9540, what is now the correct formatting of the antiVirus.bat file and what needs (if anything) to go into the "script arguments" field?

For example, previously, my command line was this:

C:\Program Files\ESET\ESET Security\ecls.exe /base-dir="C:\Program Files\ESET\ESET Security\Modules" /aind /adware /unsafe /unwanted /clean-mode=delete /quarantine /quar-dir=C:\SmarterMail\Spool\Quarantine /no-log-console /log-file=L:\ESET\EsetCMD.log /log-all %FILEPATH

During the upgrade, the "migration" of that essentially failed because of the stupid Microsoft insistence of using spaces in paths. 

So now I am trying to recreate that and I can see the antiVirus.bat file being called, but no other activity is occuring.

Currently, the antiVirus.bat file has this:
@echo off
REM Auto-generated antivirus wrapper
call "C:\Program Files\ESET\ESET Security\ecls.exe"
exit /b %ERRORLEVEL%

Brandon Murphy Replied
Employee Post
Hello,

After the 9540 update, command line actions were moved to the [C:\Program Files (x86)\SmarterTools\SmarterMail\Service\Assets] directory. The issue is that your old command line script used '%FILEPATH% (uppercase with a trailing %) when the updated build expects '%filepath' (lowercase with no trailing %). This file should be named antiVirus.bat in the Assets directory. The Script Arguments field should use lowercase %filepath without the trailing %. 
I'll include an example below:
/base-dir="C:\Program Files\ESET\ESET Security\Modules" /aind /adware /unsafe /unwanted /clean-mode=delete /quarantine /quar-dir=C:\SmarterMail\Spool\Quarantine /no-log-console /log-file=L:\ESET\EsetCMD.log /log-all %filepath
SmarterMail will call antiVirus.bat from the Assets folder. The wrapper script (generated during migration) calls your actual executable with all arguments. Then SmarterMail replaces %filepath with the actual file path before executing. 
The current wrapper content should be:
@echo off
REM Auto-generated antivirus wrapper
call "C:\Program Files\ESET\ESET Security\ecls.exe" %*
exit /b %ERRORLEVEL%

I see that you have active maintenance and support. If you are still having issues with this after making these changes and reviewing our help documentation, feel free to open a support ticket and we can assist you further in troubleshooting this.

Thank you,
Brandon Murphy
System/Network Administrator
SmarterTools Inc.

Reply to Thread

Enter the verification text