Author Topic: Avast Pro/Home, Delete Automatic (prev Visual Basic question on Ashcmd)  (Read 4165 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
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?


« Last Edit: March 06, 2005, 08:36:39 AM by renelou »

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
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...
The best things in life are free.

Offline Eddy

  • Avast Evangelist
  • Maybe Bot
  • ***
  • Posts: 31078
  • Watching (over?) you
    • Malware removal, Biljart and other things.
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"


  • Guest
okay guys.. I got the automatically delete.. for now I could live with that until I find how to get the return codes.. :)


Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11862
    • AVAST Software
I'm not familiar with Visual Basic and its functions, but using C and pure API, I would do something like:

DWORD dwReturnCode = 0;

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.