ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
startup shortcut
gardsted


Joined: 14 Dec 2012
Posts: 1
Location: Sweden
Reply with quote
Code:
"""
fanx for a free virus scanner - clamwin
this is my small contribution -
a python program to update and start the scanner,
so it runs at login
it needs a python - ive only tried it with 2.7 on winxp

simply name this file 'virusscan.pyw' and place it in your start->all programs->startup folder
modify paths as necessary - specially on 64 bit machines

the log, temporary and infected files will be in c:/virusscan

"""

import subprocess, os, datetime

for i in ['tempdir', 'infected']:
    p = os.path.join('c:/virusscan/',i)
    if not os.path.exists(p):
        os.makedirs(p)

drives = ['c:','d:']

clamwin = r"C:\Program Files\ClamWin\bin\ClamWin.exe"
clamscan = r"C:\Program Files\ClamWin\bin\ClamScan.exe"
clamdb = r"C:\Documents and Settings\All Users\.clamwin\db"

update = [clamwin, '--mode=update', '--close']


runs = [update] + [[
    clamscan,
    '--stdout',
    '-r',
    '--log=c:/virusscan/log.txt',
    '--move=c:/virusscan/infected',
    '--tempdir=c:/virusscan/tempdir',
    '--memory',
    '--kill',
    '--infected',
    '--database=%s'%clamdb,
    '%s/'%drive
    ] for drive in drives]

print runs

for r in runs:
    startupinfo = subprocess.STARTUPINFO()
    startupinfo.wShowWindow |= 0 #SW_HIDE
    startupinfo.dwFlags |= 1 #STARTF_USESHOWWINDOW
    open('c:/virusscan/log.txt','a').write("%s :\n%r\n"%(datetime.datetime.now(),r))
    process = subprocess.Popen(r, startupinfo=startupinfo)
    process.wait()
View user's profileSend private messageSend e-mail
GuitarBob


Joined: 09 Jul 2006
Posts: 4937
Location: USA
Reply with quote
Thanks. I hope it will help some users.

The Clam Sentinel program is a free, Open Source Delphi program that lets you use ClamWin as a real-time scanner when files are added, modified, or copied to your computer. Clam Sentinel also has its own heuristic engine that detects files that are infected with new malware. It is a separate project from ClamWin, and you must have ClamWin already installed before you install Clam Sentinel. You can download Clam Sentinel from http://sourceforge.net/projects/clamsentinel/ on the web. Read the Simple Guide before you use it.

Regards,
View user's profileSend private message
startup shortcut
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