ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Configuring Scheduled Scan - with coomand line
marculos


Joined: 08 Dec 2009
Posts: 0
Reply with quote
Is there any way of setting up a Daily Scan from the command line e.g. to set C:\ to be scanned daily.

Is a conf file or a registry key modified.

I just want to install Clamwin silently and then set it to scan daily, without the need to open Clamwin.

Any ideas would be most appreciated.
View user's profileSend private message
Scheduled Scan as Network Administrator
JustinDingle


Joined: 04 May 2009
Posts: 0
Location: South Africa
Reply with quote
I have a similar query.

I would like to scan my computers using clamwin on a daily basis.
The only catch. I need to scan the HD's as a Network Administrator.
I need to specify that the daily schedule runs as a Network Administrator
and not as my Network Users, seeing that when a virus is found the user
doesnt have the rights to move the virus into the quarantine directory.

This is what I tried.

I added a Scheduled Task on Windows opening the program ClamWin.exe
as a Network Administrator User. Then I added a scheduled scan inside
the Program...my logic.

The program gets open with administrator rights and then shortly after
the scheduled scan runs a Task as the Network Administrator...

It didnt work...should i use Clamscan executable?

Any help will be much appreciated.

Kind Regards,
Justin Dingle
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
yes, clamscan should do the trick, there was apost somewhere in the forum on the command line parameters
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
I'm not a command line guy, but this may help you.

https://linux.die.net/man/1/clamscan

Regards,
View user's profileSend private message
clamscan
JustinDingle


Joined: 04 May 2009
Posts: 0
Location: South Africa
Reply with quote
thank you for the replies...

i will try running a clamscan task as an admin as a scheduled task...
i guess it automatically scans your c root drive...but if there is away
to specify certain directory files please let me know...is there HOW TO's
for windows for clamwin...i wouldnt mind playing around with the app
more...

@ Guitarbob...

those commands are for linux. my users still uses windows unfortunately...
but all my servers are running linux now...hooray for SAMBA...

thanks again
View user's profileSend private message
Running Clamwin's Clamscan process through command line
JustinDingle


Joined: 04 May 2009
Posts: 0
Location: South Africa
Reply with quote
@ marculos

I thought I will post my progress with the help of a senior.
If you direct yourself in the command line to clamscan's path: C:\Program Files\ClamWin\bin
Type in this command: clamscan --help

This will bring up all the options and switches that are available to you.

We created our own temp directory, quarantined directory and virus database directory.
This is how our command now looks like.

C:\"Program Files"\ClamWin\bin\clamscan c:\ --memory -k -i -r -d C:\antivir --tempdir=C:\antivir\temp -l=C:\"Documents and Settings"\"All Users"\.clamwin\log\log.txt --move=C:\antivir\vir

First we direct ourselves to where clamscan sits and call the program.
Then we specify our root directory C:\ to be scanned.
Then we specify to scan the memory and kill [-k] any infected processes thats infected(this might be risky for some users)
Then we only print infected files in command line and log [-i], Then we specified this switch -r (Scan subdirectories recursively)
Then we told clamscan where to find our virus database files, created our own temp directory, specified where our logs needs to go, and our viruses
needs to be quarantined in.

Hopes this helps. Im going to run this command as a bat file, as a Scheduled Task with admin rights.

Justin and Franco

"We take no responsibility if this script causes any harm" ;)

QUESTION: When I execute this script i keep on getting this warning in the console.
LibClamAV Warning: Incorrect magic number in optional header

Does anyone know what this means? I couldnt find a solution to fix it, or even identify what it means???
View user's profileSend private message
Clamscan.exe Command-line update
JustinDingle


Joined: 04 May 2009
Posts: 0
Location: South Africa
Reply with quote
I put this little system in production. Its working beautifully.
The only thing I couldnt get right was update the log file.
So i put my command line string inside a bat file, and created
another bat file that calls my clamscan command bat and then I
output it into a log file.

Like this.

created a bat file called run.bat
then inside that bat file i did this

virscan.bat > log.txt
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
Justin:

Thanks for keeping at this. I think I can use it for something I am doing on a custom scan for ClamWin. Perhaps the ClamWin developers could also use the info.

Regards,
View user's profileSend private message
@ GuitarBob
JustinDingle


Joined: 04 May 2009
Posts: 0
Location: South Africa
Reply with quote
Its a pleasure. I always wanted to find a way to use this application in a big production environment, seeing that if you have to scan your network computers from one workstation, the program only allows you to scan 20 ip's...and one scan takes a couple of hours, so that wasn't a solution...scanning the pc's locally and automatically is working really great, i just wish i can find a malware scanning programming that can rendered the same type of service.
View user's profileSend private message
Configuring Scheduled Scan - with coomand line
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