Scan on File Download

Submitted by trephin on April 22, 2007 - 11:19pm.

I have a couple of questions.

First, does using any ClamWin components without starting from ClamWinPortable.exe cause any problems after closing? In other words, does ClamWinPortable.exe perform any cleanup tasks like MirandaPortable.exe does?

Second, I would like to use ClamWin to automatically scan received files in Miranda. I am not sure what I should enter into the command line in miranda under virus scanning... I did read a couple of posts in both this forum and the Miranda forum but was still unclear of what to use. I tried using

..\PortableApps\ClamWin\App\clamwin\bin\clamscan.exe %f

without success

Any help would be appreciated.

( categories: )

If you run

Clamwin without Clamwinportable, it wont be portable. It's never a good idea to tun any app released here directly (=without running the Launcher)
"There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!" - Richard Feynman

"I was just out walking my rat and I seem to have lost my way" - James Bond in Diamonds are forever

Command Line

Not sure about Miranda, but command line usage should be the same:

http://portableapps.com/node/5767#comment-31657

Hmm

Probably should be ..\PortableApps\ClamWin\ClamWinPortable %f
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

Waiting for Rocks'n'Diamonds Portable? Fear not, it's coming soon.

No clue about Miranda's possibilities, but...

I think the "--mode" and "--path" parameters are necessary.

I have no clue about Miranda's possibilities to handle relative paths or about your directory structure, but if %f is the variable for the downloaded file to scan, then the command should look something like that:

..\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close

That way you can be sure to use the portable version.

Though I don't think that using clamscan.exe does any harm, it's parameters are far more complicated:

..\ClamWinPortable\App\clamwin\bin\clamscan.exe --bell --database="%YourDrive%\PortableApps\ClamWinPortable\Data\db" %f --log=%YourDrive%\PortableApps\ClamWinPortable\Data\log\ClamScanLog.txt

You could skip the "--log" part, but "--bell" is recommended, as the window closes immediately after scan. And the parameters contain absolute paths (change %YourDrive% to your needs) Sad

For more information about clamscan.exe's command line usage run clamscan.exe --help.

BTW

BTW,

..\PortableApps\ClamWin\App\clamwin\bin\clamscan.exe %f

If MirandaPortable and ClamWinPortable are both in PortableApps, wouldn't that be a step too far into the directory structure?

Nope

But it appears he renamed ClamWinPortable to ClamWin
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

Waiting for Rocks'n'Diamonds Portable? Fear not, it's coming soon.

Same for Ff Portable?

Would this be the same for Firefox Portable, or more precisely, for various extensions in Ff? I use Download StatusBar, & am trying to figure out the command-line to pass to it.

Is there a comprehensive list of command-line options for ClamWin Portable? I would like to add the option to update the database automatically before scanning, if such exists.

TSamuel Smiling

Thanks

Thanks for the replies.

I tried using in Win XP the following

..\PortableApps\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close

but Miranda seemed to have difficulty and ClamWinPortable never starts. If I add the drive letter, it works fine.

I have to double check, but I think I was getting a message that the file was unable to be accessed when I tried the above in Win ME.

If the ..\ does not work, I suppose that Miranda cannot handle a relative path in this field? I would have to manually change the drive letter whenever the drive letter is assigned a different letter?

Odd, but the drive letter for the location for where transferred files are located changes. I wonder if that occurs because the location is within the MirandaPortable directory structure? If so, would that be a function of MirandaPortable or Miranda? I ask because I figure to have a more positive response here than with the Miranda devs for this particular, small issue.

Thanks again.

Try this.

..\..\PortableApps\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close

Or,
..\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close

Better?

Trying to get this working...

but not having much luck Sad

Default installation of both apps on USB drive (XP), I'm using "..\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close"

As in trephin's last post, if I use "S:\PortableApps\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close", it works.

Can anybody confirm whether using relative paths is possible? This post seems to suggest that it is - http://portableapps.com/node/2571

Thanks

In order to use relative

In order to use relative paths accurately, you have to know what the current path is. Sometimes the only way is to experiment.

You might try sticking cmd.exe in the Miranda scan field, for testing, then type CD to learn what directory it is "in". If you can get cmd to open, you can experiment (by hand) with different numbers of ..\.. etc until you get one that works, then put that into the Miranda field.

MC

Another ingredient for a happy marriage: in a family argument, if it turns out you are right -- apologize at once! (The Notebooks of Lazarus Long)

GPG key: 0565D971 | see you on IRC channel: #portableapps on irc.freenode.net

cmd.exe...

what a tip! Worked like a charm. For the record, on a default install it's...

..\..\..\ClamWinPortable\ClamWinPortable.exe --mode=scanner --path=%f --close

So close, yet so far...

Thank you very much Smiling