|
From: Alch <al...@us...> - 2004-12-02 17:01:55
|
> > So I'd run clamscan.exe directly? This takes the same
> parameters as
> > the
> > UNIX version? (I checked manual.pdf and it doesn't seem to mention
> > running clamscan.exe outside of from the widget).
> I get a similair thing if I try to run freshclam manually.
> C:\PROGRA~1\ClamWin\bin>freshclam.exe
> ERROR: Can't parse the config file /usr/local/etc/clamd.conf
>
Please take a closer look at the manual (Advanced Operation section).
In the 0.37.3 you will need to replace
C:\ with /cygdrive/c and change all \ to / in the command line
parameters for freshclam and clamscan.
For clamscan.exe you need to add --max-ratio=0 to disable oversized zip
file being reported as virus as well as you need to specify
--tempdir="path to your temp dir"
The manual needs updating...
--------------------
Running a Virus Scan from the Command Line
ClamWin can be run from the command line, from a batch file for
instance. For a full list of
parameters, navigate to the directory containing the executable files
("C:\Program
Files\ClamWin\bin" on a default installation) and run
clamscan.exe --help
The database directory must be specified, using the --database=FILE/DIR
parameter.
In a default installation, the command to scan the entire C: drive would
be:
clamscan.exe --database="C:\Program Files\ClamWin\db" --recursive C:\
Note the use of the --recursive parameter to ensure that sub-directories
are scanned.
When run from the command line, a value will be returned, indicating
whether or not a virus
was detected. If no virus is found, the return value will be 0. If a
virus is found, the return
value is 1. Any other return value indicates an error.
Updating the Virus Database from the Command Line
ClamWin uses freshclam.exe to update the virus database. As with the
clamscan.exe
scanning program, this can be run from a command line, batch file, etc.
For a full list of
parameters, navigate to the directory containing the executable files
("C:\Program
Files\ClamWin\bin" on a default installation) and run
freshclam.exe --help
Both the database directory and the configuration file must be
specified. ClamWin generates
a freshclam configuration file on the fly, so you will have to create
your own. The
configuration file is a text file. See the ClamAV documentation for full
details of what can be
included. A simple freshclam configuration file would have the following
lines (lines
beginning with a # are comments):
# URL of server where database updates are to be downloaded from
# If this option is given multiple times, each will be tried in
# the order given until an update is successfully downloaded
DatabaseMirror database.clamav.net
# Number of times to try each mirror before moving to the next one
MaxAttempts 3
Once a freshclam configuration file has been created, freshclam can be
run with a command
similar to the one below:
freshclam --datadir="C:\Documents and Settings\All Users\.clamwin\db" --
config-file="C:\Program Files\ClamWin\bin\freshclam.conf"
---------------
|