ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Execution Problem using clamscan under Windows
bjt


Joined: 08 Jun 2010
Posts: 0
Reply with quote
Hello,

I wanted to test the clamscan command line utility and therefore installed the latest clamWin installation (0.96.1) on my machine. It's a windows XP.

My problem is the following:
Code:
C:\Programme\ClamWin>bin\clamscan.exe unins000.dat
LibClamAV Error: cl_load(): Can't get status of db
ERROR: Can't get file status
...

This happens in any other directory except C:\Programme\ClamWin\bin.

If I change directly into the bin-directory of the installation, it works, though:
Code:
C:\Programme\ClamWin\bin>clamscan.exe ClamWin.conf
C:\Programme\ClamWin\bin\ClamWin.conf: OK
...


My Virus database is up to date:
Code:
C:\Programme\ClamWin\bin>freshclam.exe
ClamAV update process started at Tue Jun 08 14:55:21 2010
Connecting via iproxy
main.cvd is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)
Connecting via iproxy
daily.cvd is up to date (version: 11157, sigs: 95433, f-level: 51, builder: ccordes)
Connecting via iproxy
bytecode.cvd is up to date (version: 25, sigs: 3, f-level: 51, builder: nervous)


Question: Why could clamscan fail with the error message:
Code:
LibClamAV Error: cl_load(): Can't get status of db
ERROR: Can't get file status

... unless started within the bin-directory of the ClamWin-installation?

Thanks,

Bjoern
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
Below is some info from the Advanced section of ClamWin Help:

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

Hope this helps--I'm not a command line guy--used to be in DOS but that was a while ago.

Regards,
View user's profileSend private message
bjt


Joined: 08 Jun 2010
Posts: 0
Reply with quote
Hi,

thanks, the --database parameter pointing to the db-Directory, which freshclam fills with Virus definitions, makes clamscan also run outside of the bin-directory.

Regards,

Bjoern
View user's profileSend private message
Execution Problem using clamscan under Windows
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic