quote:
Originally posted by Dreamsilver
Here's what I have in my File Transfer scanning path
"C:\Program Files\ESET\ESET NOD32 Antivirus\ecls.exe" /adv-heur /adware /arch /auto /boots /files /mail /no-log-all /pattern /quarantine /rtp /sfx /subdir /unsafe /unwanted /action=clean %1
I'm not sure if its working or anything, because I don't see any window or anything scanning when I receive a transferred file.
The error you make is the use of the %1 tag.
Windows Live Messenger does not replace any command line tags like that. Instead it simply concats the filename to the command line string.
Thus loose the %1 and it will work...
Also see
CookieRevised's reply to scan receiving files
----------------------------------------------------------------------------
quote:
Originally posted by SpunkyLoveMuff
I think it all needs to be in the quotes, because the arguments form part of the path... Have you tried it without them?
Windows Live Messenger will already add quotes if the path or name of the file has spaces in it.
The thing which he did wrong was using '%1'....
----------------------------------------------------------------------------
quote:
Originally posted by Butcher_ss
Download this file and put it into your NOD32 Antivirus folder.
ScanFile
That batch file has some errors:
1) Change the first line from:
echo off
to
@echo off
2) Never hard copy a path in the batch file, this most likely will not work for other people (not everybody uses the same folder names). Instead simply add:
ecls.exe %1 /aind /files /no-boots /arch /mail /sfx /rtp /no-subdir /adware /unsafe /unwanted /pattern /heur /adv-heur /action=clean /quarantine /no-log-all
...thus without any path (and quotes). Also try to loose the base-dir parameter for that very same reason.
If this doesn't work (then the command line scanner is not programmed that good), you could always retrieve the startup/base path by using the %0 tag (the complete startup command line) and some of the extended variables for string manipulation like so: %~dp0. This will strip the drive and path name from the used parameter.
Thus:
"
%~dp0ecls.exe" %1 /base-dir="
%~dp0" ...........
3)
Remove the 'exit' command. It is only usefull if you want to exit with a specific error code or want to close the window even if you happen to use the batch file from the command line manually.
So, you should realy leave it out or add the parameter /B (which will both have the same result).
If you want to use it, do not use it without the /B parameter for stuff like this! But as said, using the /B parameter is just the same as not using the exit command at all.
The /B parameter makes that you will exit the batch file with the last generated errorlevel code. If NOD32 is programmed decently and it reported an infected file, the chance is very high that it also outputs an errorlevel code. In that way, this code will be passed to Windows Live Messenger and will on its turn show the user that the received file is infected in the conversation window (anything different than errorlevel code 0 will generate that message).
4)
I dont know the command line tool of NOD32, but most likely it also outputs DOS Errorlevels like I said above. This can also be used in the batch file itself. In that way you can check if a file was infected and either wait (thus 'pause') so the user can see the results, or simply quit without showing anything, which is more user-friendly than always pauzing.
Moreover, isn't there already a parameter for NOD32 to wait for user input if an infection is detected??? Almost all scanners I know of have such a parameter. This would make this whole batch file bussiness realy unneeded.