Command-Line Updates and Scans

This Article Applies to:

  • AVG Business Antivirus

Command Line Updater/Scanner

Below are the folder paths to the AVG command line updater/scanner, and report files.

Default .exe File location:

  • %ProgramFiles%\AVG\Antivirus

Default Report File location:

  • %ProgramData%\AVG\Antivirus\report

ashUpd.exe (Updates)

Update Virus Definitions Command: ashUpd.exe vps [/autoreboot] [/help]

Update Antivirus Program Command: ashUpd.exe program [/autoreboot] [/help]

ashCmd.exe (Scans)

  • (area name): area for virus testing; there can be multiple areas in your command
  • /# or --remote: remote disks
  • /* or --local: local hard drives
  • /?, /h or --help: displays a short description of all parameters
  • /@ = expect string or --task = expect string: parameter contains name of task which will be started; other parameters are ignored
  • /_ or --console: application will be ready for STDIN/STDOUT
  • /a or --testall: test of all files
  • /c or --testfull: scan entire files
  • /d or --dontpanic: do not switch to 'panic mode' when a virus is found
  • /e = expect byte or --heuristics = expect byte: set the heuristic sensitivity, where 0 is no heuristics and 100 is the maximum sensitivity
  • /f = expect string or --fileactions = expect string=[BPSW] additional configuration for actions on infected files:
    • B: allow delayed actions (after reboot) for locked files
    • P: if a file cannot be removed from an archive, try to remove its parent(s) instead
    • S: do not remove associated auto-start references when removing a file
    • W: when an infected file is found in an archive, perform the action with the whole archive, not just the file inside
  • /g = expect byte or --checkgenuine = expect byte: =[0|1] check digital signatures of infected files (and ignore genuine)
  • /i or --ignoretype: ignore virus sets
  • /j or --paging: paging the lines if program is not in STDOUT mode (parameter /_)
  • /m or --boot: test boot sectors and whole operating memory
  • /p = expect byte or --continue = expect byte: program doesn't wait for user input (/p); automatic action with infected file (/p=[01234])
    • 0: fix automatically
    • 1: delete file
    • 2: move to chest
    • 3: repair
    • 4: stop when virus is detected
  • /q or --stopclean: stop on clean files and wait for user input
  • /r = expect string or --report = expect string: =[*~][file] create report file. * includes Ok files, ~ includes skipped files
  • /s or --soundoff: no sounds
  • /t = expect string or --archivetype = expect string: =[JZIMXRSTGCBWOEQHFVKPY7D6U4123AN]; default option is /t=XSW2
  • /u = expect string or --sendmessage = expect string=(address) send message about found virus to selected address
  • /w = expect string or --exclude = expect string: =(mask) exclude specific file/folder from scanning (wildcards accepted)
  • /x = expect string or --virustypes = expect string: =[P] detect specific malware types that are not detected by default:
    • P: PUPs (potentially unwanted programs)

Example AVG Batch Script

Please backup all/any critical/important data first before running the scan below. This is a scan you could run if you suspect the device is infected, but may take several hours!

@Echo Off

CD /D "%ProgramFiles%\AVG\Antivirus"

ashUpd VPS

ashCmd /* /a /c /e=100 /f=B /m /p=0 /t=A /w="%ProgramFiles%\Malwarebytes\*" /x=P /r=~"%ProgramData%\AVG\Antivirus\report\FullScan.txt"

"%WinDir%\System32\ShutDown.exe" /s /f /t 600 /c "Shutting down computer in 10 (ten) minutes! Please save all work immediately!"


  1. Changes directory to %ProgramFiles%\AVG\Antivirus
  2. Checks for virus definition updates (highly recommended before starting scan)
  3. Runs a full, thorough scan on local device, including boot sector, memory, all/whole files, and all archive files
    • Heuristic sensitivity is set at maximum (highest)
    • Attempts to fix infected files automatically, including locked files after restart
    • Excludes the %ProgramFiles%\Malwarebytes folders and files from scan
    • Also scans for PUPs (Potentially Unwanted Programs)
    • Creates %ProgramData%\AVG\Antivirus\report\FullScan.txt report file that includes skipped files
  4. Shuts down device after scan, and exits batch script