ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Command to update Clamwin AV signatures
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Hello All,

Were I work, I utilize a product call Deep Freeze (allows workstations TO Reboot eliminating any changes that wre made).
it has a feature, that when in Maintenance mode it can automatically update your AV signatures. this requires a Batch job. Does anyone know the Command that will start the update procedure?

Thanks very much,
Alski
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Just for clarification, my last sentenance refers to the Clamwin update.
Thanks
View user's profileSend private message
Re: Command to update Clamwin AV signatures
b0ne


Joined: 26 Oct 2006
Posts: 174
Reply with quote
alski wrote:
Does anyone know the Command that will start the update procedure?
freshclam --datadir=\path.to.database.files --config-file=freshclam.conf --log=.\log\sigupdates.log
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
bOne

thank you very much I appreciate it.

Alski
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
bone,

In your exaample that you posted freshclam --datadir=\path.to.database.files --config-file=freshclam.conf --log=.\log\sigupdates.log

When inserting the clamwin path, do I leave in the \ prior to the path?
So basically right now I have \c:\documents and settings\all users\.clamwin\db

Thank You,
Alski
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
ok,
I am some what confused here. According to the command string posted, there is a section for the path on my
computers were the ClamWin data base resides, basically c:\documents and settings\all users\.clamwin\db
How does this know to get the updates from database.clamav.net etc?
As of now, this procedure is not kicking in and doing any updates via above mentioned software. Also, it was mentioned
to eliminate the Batch statements and to just supply the clamwin update command.

Thanks very much
View user's profileSend private message
b0ne


Joined: 26 Oct 2006
Posts: 174
Reply with quote
alski wrote:
When inserting the clamwin path, do I leave in the \ prior to the path?


I have a stripped down clamwin installation in "C:\Program Files\ClamWin"; my signature updater batch file is located in that directory.

You use ".\" when you reference the directory you're currently in.

I have a subdirectory "db" under my ClamWin folder where the database files go, and a "log" under ClamWin as well.

So when I use ".\db" or ".\log" the command prompt replaces the ".\" with "C:\Program Files\ClamWin, thusly filling it out to be "C:\Program Files\ClamWin\db" or "C:\Program Files\ClamWin\log" respectively.
View user's profileSend private message
b0ne


Joined: 26 Oct 2006
Posts: 174
Reply with quote
alski wrote:
How does this know to get the updates from database.clamav.net etc?


The freshclam.conf is where freshclam makes the determination where to get updates from. I also have freshclam.conf in my c:\program files\clamwin directory.

"--config-file=c:\program files\clamwin\freshclam.conf"
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 898
Location: Italy
Reply with quote
you can tell freshclam and clamscan where to find db and conf dir using this registry entry:
Code:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\ClamAV]
"ConfigDir"="C:\\Clamav"
"DataDir"="C:\\Clamav\\db"


Be sure that paths are same of clamwin installation
this way you can avoid passing options to cmdline

change HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER if not administrator
it can work with a minimal freshclam.conf
Code:

DatabaseMirror database.clamav.net
DNSDatabaseInfo current.cvd.clamav.net
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Hello All,
Thank you for all the responses. I do not have very much experience with batch commands etc and I seem
to be overwhelmed with all the suggestions. Would it be possible that someone can post the actual code that I need
for this Clamwin sig updates to take place when I run my maintenance cycle in this product I am using called Deep Freeze?
I would really appreciate it and I will definitly learn something in this process.
Current, all of my computers at work have clam win 88.7 installed. The DB resides at
c:\documents and settings\all users\.clamwin\db and both main.cdv and daily.cdv are in the DB folder.
All I want to do, is set my Deep Freeze maintenance cycle to automatically update clamwin via Deep Freeze's Batch section of the product.

Thank You,
Alski
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 898
Location: Italy
Reply with quote
Assuming you have installed clamwin in c:\program files\clamwin

Code:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\ClamAV]
"ConfigDir"="C:\\Program Files\\ClamWin\\bin"
"DataDir"="C:\\documents and settings\\All users\\.clamwin\\db"


put a file called freshclam.conf in:
c:\program files\clamwin\bin

with this text:
Code:

DatabaseMirror database.clamav.net
DNSDatabaseInfo current.cvd.clamav.net


you may need to add proxy options if you are behind a proxy

then simply call freshclam
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Hello Sherpya,

Currently I have the following within the Deep Freeze Code:

freshclam --datadir=\c:\documents and settings\all users\.clamwin\db --config-file=freshclam.conf --log=.\log\sigupdates.log

From what I understand, during the Deep Freeeze maintenance cycle, it is suppose to execute the Batch command to update
the ClamWin DB. I am trying to use this method without having to update 144 computer Windows Registries. Since the command i snot working , I assume that I do not have it entered correctly. Can you please verify the above code to see were I may be going wrong?. Of course the other way around this, is to set each pc's Clamwin to update at a certain time, say 7pm,this then would be incorporated in to Deep Freezes maintence cycle period which may be 4pm to 10pm etc. I do not like this method, because each computer then has to have it's Clamwin DB update time edited
Thanks very much,

Alski
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 898
Location: Italy
Reply with quote
You must use quotes for paths with spaces, this may be the problem
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Hello Sherpya,

this is what I have coded within my Deep Freeze software:

freshclam --datadir=\"c:\documents and settings\all users\.clamwin\db" --config-file=freshclam.conf --log=.\log\clamupdatelog.txt

Are the Quotes in the right area?
I did get Freshclam to execute from the Windows CMD prompt with the Freshclam.Conf that I coded.
I just now have to get this to work without manually executing from the cmd prompt.

thanks,
Alski
View user's profileSend private message
alski


Joined: 17 Jan 2007
Posts: 15
Reply with quote
Sherypya,

It seems my DB logfile (Clamwinupdate.txt )is not getting updated when I execute freshclam from the cmd prompt.
Any ideas as to what the problem may be?

Thank You,
Alski
View user's profileSend private message
Command to update Clamwin AV signatures
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 2  

  
  
 Reply to topic