Author Topic: A Batch File To Launch The Free Version 's Thorough Scan  (Read 24422 times)

0 Members and 1 Guest are viewing this topic.

JackInCT

  • Guest
A Batch File To Launch The Free Version 's Thorough Scan
« on: July 04, 2010, 03:42:39 AM »
I am wondering IF somewhere along the way, someone has written the necessary DOS code to create a batch file that would start not only a Though Scan, but deal with any viruses (on just my primary partition), and anything else that would need to be done to run completely unattended until the end of the scan, and leave a log someplace that would tell me if any viruses were found, their disposition, etc.,.  The goal of this batch file would be for me to THEN figure out how to launch my backup software of my primary partition immediately after that, via a batch file, so that its backup file would be as virus free as can be had if it ever came to having to use its Restore function. Please just point me to where that batch post is. Thank you

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67195
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #1 on: July 04, 2010, 04:57:53 AM »
There is a full command line version... in the paid antivirus.
The best things in life are free.

Offline superhacker

  • Avast Evangelist
  • Advanced Poster
  • ***
  • Posts: 979
  • superhacker != super mario
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #2 on: July 04, 2010, 08:08:37 AM »
i think it will be done through an a2it script but i dont think it is legal to do so. ;)
any way i will try.
Dreams don't die, they just fall asleep.

JackInCT

  • Guest
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #3 on: July 04, 2010, 05:16:27 PM »
There is a full command line version... in the paid antivirus.

OK I certainly am willing to go that route considering what's at stake, but first: over and above that there's a command line, I have two questions, (1) can even with the command line, and I presume that what we're talking about here is an MS-DOS batch file with ALL the various features re capabilities, but that in the XP OS is NOT literally the same set of available commands that were available back in the MS-DOS 3.3 days, but there's enough of them available for me to accomplish my ultimate goal of launching 3 successive software programs in unattended succession, & (2) does a batch file already exist that does the Avast scan somewhere in the forum, etc., as to other locations.  Thank you.

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9406
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #4 on: July 04, 2010, 06:33:16 PM »
Why not schedule your custom profile? Can be done even in free version.
Visit my webpage Angry Sheep Blog

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67195
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #5 on: July 04, 2010, 07:52:24 PM »
How to use the command-line scanner
This feature is only available in avast! Pro antivirus and avast! Internet Security.

The ashCmd program uses the same avast! scanning engine to detect potential malware infections so the results are exactly the same as running a scan via the normal program interface. The avast! command-line scanner, ashCmd.exe, is normally installed in the directory C:\Program Files\Alwil Software\avast5.

A scan is run from the command prompt using various switches and parameters. To see a description of the parameters, locate the ashCmd file and double click on it. This will open a new window in which the various parameters are displayed. A list of all the parameters can also be found here in the avast! Help.

To run a scan, go to the command prompt and change the directory to:

C:\Program Files\Alwil Software\avast5

Then type the program name ashCmd.exe followed by the area to be scanned and the appropriate parameters. For example, to scan all local hard drives, the command line would be:

ashCmd.exe /*

Additional parameters can be added as required. To scan a particular file, type the required path, making sure that any names containing spaces are enclosed in quotation marks (" ") e.g.

ashCmd.exe "C:\Program Files"

To run a particular scan, type the program name followed by /@=<name of scan>. For example, to run a scan called "Weekly scan", the command line would be:

ashCmd.exe /@="Weekly scan"

The scan will be run based on the parameters defined for the given scan. Any other parameters entered in the command line will be ignored.

When the scan is finished, the results can be output to a file using the parameter "/_ >" so, for example, the command line:

ashCmd.exe C:\Windows /_ > results.txt

would result in the path C:\Windows being scanned and the results of the scan being saved in a new file called results.txt
The best things in life are free.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67195
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #6 on: July 04, 2010, 07:52:56 PM »
Parameters and Switches
Example: "C:\Program files" /p /u=virus@avast.com --soundoff /v="key kapt"

d:\path
This parameter specifies the drive and directory that should be tested. If the parameter is not given, the files in the root directory of the current drive are scanned. It is possible to specify more drives simultaneously.

d:\path\file
When the full pathname of a file is given, ashCmd only this one file is scanned. The file must exist!

/H or /?   (or --help)
Prints brief help and a list of possible switches.

/#   (or --remote)
Scans remote disks.

/*   (or --local)
Scans local hard disks.

/_   (or --console)
The application will be ready for STDIN/STDOUT. All the output will be redirected to the standard output (STDOUT). It means that the output can be processed using various UNIX-style command-line tools.

/A   (or --testall)
Tests all files.

/@=<task name>   (or --task)
Starts a particular avast! scan. All the other parameters are ignored. If the scan name contains any spaces, it must be enclosed in quotes.

/C   (or --testfull)
Switches on scanning of whole files. By default, only the important parts of the files are tested, which is much faster. When any virus is found, the program switches to scanning the whole files automatically.

/D (or --dontpanic)
Tells avast! that it should not switch to "panic mode" when an infected file is found. Panic mode means, the sensitivity is automatically increased to the maximum.

/E=<value> (or --heuristics)
Sets the heuristic sensitivity of the scan. The value can be in the range 0 - 100, where "0" means disabled and "100" is the maximum heuristic sensitivity.

/F=<value> (or --fileactions)
Tells avast! how to process infected files, e.g.

B = allow delayed actions (after reboot) for locked files.
P = if a file cannot be removed from an archive, try to remove the parent archive
S = do not remove associated auto-start references when removing a file
W = if an infected file is found inside an archive, apply the action to the whole archive, not just the infected file.
/G=<value> (or --checkgenuine)
This tells avast! to check the digital signatures of suspicious files and what to do if the signature is from a trusted source. The value can be "0" (which means all files will be reported) or "1" (to not report files with digital signatures from trusted publishers)

/I   (or --ignoretype)
Switches on searching for all viruses in all files (i.e. boot viruses will be looked for even in .exe files etc.).

/J   (or --paging)
Pages the lines if the program is not in STDOUT mode (i.e. stops after each full page of results).

/M   (or --boot)
Tests boot sectors and the operating memory.

/P   (or --continue)
This switch specifies that the program will run without any delays after checking the disk system areas and without waiting for user interaction when a virus is found. To check the result of the scan, you can use predefined return codes, or information stored in a report file. To specify an automatic action with the infected files, use /P=[1234], where 1 = delete file, 2 = move to Chest, 3 = repair, 4 = stop.

/R=
  • [file name]   (or --report)

This switch specifies that a text file will be created with a list of viruses found and a summary table (report file). If the file name is not given, ashCmd.rpt in the current directory is used for the output. When the switch /R is followed by the "*" character, all the scanned files will be written to the report file (even those where no virus was detected).

/S   (or --soundoff)
This switch turns off the virus sound alert. By default, any virus found is announced by a beep.

/U=<address>   (or --sendmessage)
If a virus is found, a warning message is sent to the given address.

/T=[JZIMXRSTGCBWOEQHFVKPY7D6U123AN]   (or --archivetype)
Specifies the type of archives to scan (J:ARJ, Z:ZIP, I:MIME, M:MAPI, X:Exec, R:RAR, S:Streams, T:TAR, G:GZ, C:CAB, B:BZIP2, W:WinExec, O:ZOO, E:ACE, Q:ARC, H:LHA, F:TNEF, V:CPIO, K:CHM, P:RPM, Y:ISO, 7:7ZIP, D:DBX, 6:SIS, U:OLE, 1:Installer, 2:Dropper, 3:Emulator, A:All, N:none).

/X=<value> (or --virustypes)
Sets specific malware types that should be detected (types not detected by default)

P = PUPs (Potentially Unwanted Programs)
The best things in life are free.

Offline superhacker

  • Avast Evangelist
  • Advanced Poster
  • ***
  • Posts: 979
  • superhacker != super mario
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #7 on: July 04, 2010, 07:54:44 PM »
Why not schedule your custom profile? Can be done even in free version.
What an idea, ;)
maybe the what you need is just in front of you but you cant see him.
Dreams don't die, they just fall asleep.

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 88897
  • No support PMs thanks
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #8 on: July 04, 2010, 08:53:22 PM »
I've got a sneaking suspicion that the OP is using avast 4.8 given his comment/topic title about a thorough scan, a tern/scan not in avast 5.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.2.6105 (build 24.2.8918.824) UI 1.0.799/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

JackInCT

  • Guest
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #9 on: July 06, 2010, 06:35:56 PM »
Why not schedule your custom profile? Can be done even in free version.

I'm fairly sure that you can believe me what I state that I NEVER (as in EVER) noticed this feature BEFORE.  Yes, and it will solve my batch code struggle with a very simple solution of scheduling one for about midnight (when all my PC work is sure to have ceased), daily, having it shut the PC done too.  Well thanks to you, I have found my solution, as well thanks to everyone who participated in this topic.  I will start today with this feature, and hopefully, it will work as I expect it will, especially IF I pay more attention to Avast than I have previously.

Offline turitopa

  • Jr. Member
  • **
  • Posts: 36
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #10 on: July 10, 2010, 05:11:54 AM »
I was using this in 4.8 but have not setup yet since upgrading to 5.0
Can i use a command line to run a "custom scan" that I have setup in the UI?

I am using the free version,

cheers.

EDIT: don't worry, i can see the Schedule in the GUI....well thank good its friday...
« Last Edit: July 10, 2010, 05:19:06 AM by turitopa »

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11849
    • AVAST Software
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #11 on: July 10, 2010, 10:27:48 AM »
There's no command-line scanner in the Free version, so the answer is no; you have to run/schedule it from the GUI.

Offline turitopa

  • Jr. Member
  • **
  • Posts: 36
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #12 on: July 12, 2010, 11:05:59 PM »
Cheers Igor...
not a problem I will just setup Avast scans thru the GUI schedule.

Does anyone use another AV for on-demand scanning??  or are you just happy to use Avast for that...
(so should I use a 2nd AV for on-demand scanning or do you feel its a waste of time)

I was thinking of using Avira or a-squared for preiodic on-demand scanning...

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67195
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #13 on: July 12, 2010, 11:13:01 PM »
I particularly think it's a waste of time and resources, I mean, a second full antivirus.
I would do on line scanning.

Avira could be only on demand if you are patient enough with their weird updates and popups.
a-squared is well known for tons of false positives.
I suggest MBAM as on-demand only.
The best things in life are free.

Offline turitopa

  • Jr. Member
  • **
  • Posts: 36
Re: A Batch File To Launch The Free Version 's Thorough Scan
« Reply #14 on: July 12, 2010, 11:19:08 PM »
Why not schedule your custom profile? Can be done even in free version.

I'm fairly sure that you can believe me what I state that I NEVER (as in EVER) noticed this feature BEFORE.  Yes, and it will solve my batch code struggle with a very simple solution of scheduling one for about midnight (when all my PC work is sure to have ceased), daily, having it shut the PC done too.  Well thanks to you, I have found my solution, as well thanks to everyone who participated in this topic.  I will start today with this feature, and hopefully, it will work as I expect it will, especially IF I pay more attention to Avast than I have previously.

ditto...

no problems then I'll just use the GUI schedule feature...