Avast WEBforum

Consumer Products => Avast Free Antivirus / Premium Security (legacy Pro Antivirus, Internet Security, Premier) => Topic started by: renelou on March 06, 2005, 08:03:08 AM

Title: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)
Post by: renelou on March 06, 2005, 08:03:08 AM
its okay if there is no answer to this one but I would like to ask another one..


--- the following is the old question --- new one at bottom ---

Okay guys, Id been using Avast for quite a long time.. now Im trying to play with the Pro version because of the Ashcmd command line. I believe it says that 0-ok 1-virus is found.. that is what it says in help, i mean the return codes.. how could i get those codes from visual basic... Im just using the ordinary call SHELL("cmd /c ashcmd d:\ ...")

can anyone help? I also had used Shell("ashcmd ...") and followed the command line format... it works if I type it manually in command line but in visual basic, it returns numbers like 2789, 402, etc...


-----------------------------------------------------
okay guys... Id just settle for an answer to this question.. Is it possible in Avast 4.6 Pro/Home to not inform me of viruses but instead delete or move them automatically... without asking me?


Thaks...

Title: Re: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)
Post by: Lisandro on March 06, 2005, 04:22:07 PM
Is it possible in Avast 4.6 Pro/Home to not inform me of viruses but instead delete or move them automatically... without asking me?

Yes but only in Professional version.
In Home version you can only use Silent Mode:

Left click the 'a' blue icon.
It will start On-access protection

Click on Internet Mail and then on Customize.
Go to Advanced tab and select Silent Mode and the default answer No. This will send the file (email) to Chest.

Do the same for the and Outlook/Exchange plugin.
The answer Yes in Silent Mode keeps the virus in the file or into the message (attach) and continue the scanning. You can't configure 'delete the infected file' in the Home version.

You can do the same for Standard Shield provider, but it won't be a good idea...
Title: Re: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)
Post by: Eddy on March 06, 2005, 05:00:10 PM
How to get the return codes in VB, I would say ask that in a VB forum.
Basicly it is something like:

start ashcmd.exe
 if %1 = 0 than print "all is ok" else print "virus found"
Title: Re: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)
Post by: renelou on March 06, 2005, 07:06:51 PM
okay guys.. I got the automatically delete.. for now I could live with that until I find how to get the return codes.. :)


Thanks
Title: Re: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)
Post by: igor on March 07, 2005, 02:01:32 PM
I'm not familiar with Visual Basic and its functions, but using C and pure API, I would do something like:

DWORD dwReturnCode = 0;
PROCESS_INFORMATION ProcessInfo;

if (CreateProcess(NULL, ashCmd_full_command_line, ...., &ProcessInfo))
{
  WaitForSingleObject(ProcessInfo.hProcess, ...);

  GetExitCodeProcess(ProcessInfo.hProcess, &dwReturnCode);
  CloseHandle(ProcessInfo.hProcess); CloseHandle(ProcessInfo.hThread);
};


ashCmd.exe also supports "silent mode" - you can specify the requested actions by command-line arguments.