Using Command Line Parameters (Pro)

 

Ad-Aware can be controlled by using command line parameters.

 

Ad-AwareCommand.exe

Ad-AwareCommand.exe is the command line interface to Ad-Aware. Ad-AwareCommand.exe runs in a command prompt window and executes the command. It returns data in two ways, first as the application executable exit code.

The exit codes are:

 

0 = Ok

1 = Run Error

3 = Connect to service failed

4 = Bad Input

 

The second return data is passed on standard output as XML. It will have a numeric code and in some cases text data. The “XML return codes” are numeric codes, these can be found in the XML in the ‘result’ node. The meaning of these codes are:

 

00 = Ok

01 = Failed to connect to service

02 = No license or activation code on system

03 = Application not licensed

04 = Could not register trial license

05 = Unrecognized parameter

06 = Not logged in as administrator

07 = Scan profile not found

08 = No server name passed

 

All XML return codes are not applicable for every command line parameter, possible XML return codes are listed under each command.

 

Example:

C:\>Ad-AwareCommand.exe scan manual myscanprofile

 

Ad-Aware will run in the command line window and perform the scan named ‘myscanprofile’ with manual cleaning.

 

 

Command line Parameters

 

scan

Description: Starts a scan

Parameters: [manual] <profile>

manual – This is an optional parameter used when you want to manually choose the cleaning actions.

When the scan is completed and if an infection is found the Tray Application will notify you that the scan is finished. From the Tray Application open the scan results screen to manually choose the required action for each detected object.

profile – Which scan profile to use.

 

Possible XML return codes: 00,01,07

 

Example:

C:\>Ad-AwareCommand.exe scan manual myscanprofile 

C:\>Ad-AwareCommand.exe scan anotherprofile 

 

update

Description: Updates the software and/or definitions files.

Parameters: <defs/software/all> [silent]

defs – Updates the definitions files.

software – This updates the program with any available software updates.

all – updates both the software and the definitions files.

silent – This is an optional parameter used to suppress the dialog during an update.

 

Possible XML return codes: none

 

Example:

C:\>Ad-AwareCommand.exe update defs silent 

C:\>Ad-AwareCommand.exe update all 

 

 

license

Description: Registers the product with a specified serial number.

Parameters: [trial] <code>

 

Possible XML return codes: 00,01,02,03,04,05

 

Example:

C:\>Ad-AwareCommand.exe license 12345-ABCD-14AC4-95784

 

 

get-hardware-fingerprint

Description: Reads the hardware fingerprint.

Parameters:

 

Possible XML return codes: 00,01

 

Example:

C:\>Ad-AwareCommand.exe get-hardware-fingerprint

 

 

set-update-server

Description: Changes which update server to use for software updates.

Parameters: <servername>

 

Possible XML return codes: 00,08

 

Example:

C:\>Ad-AwareCommand.exe set-update-server mynewserver.com

 

 

get-license-info

Description: This parameter retrieves the license information.

Parameters:

 

Possible XML return codes: 00,01

 

Example:

C:\>Ad-AwareCommand.exe get-license-info

 

 

get-reports

Description: Retrieves scan or realtime protection reports.

Parameters: <scan/rp>

 

Possible XML return codes: 00,01,05

 

Example:

C:\>Ad-AwareCommand.exe get-reports rp

 

 

get-settings

Description: Retrieves the current settings.

Parameters:

 

Possible XML return codes: 00

 

Example:

C:\>Ad-AwareCommand.exe get-settings

 

 

set-settings

Description: Sets the settings.

The settings are passed as XML to standard input.

Parameters:

 

Possible XML return codes: 00,01

 

Example:

C:\>Ad-AwareCommand.exe set-settings

 

 

Using Command Line Parameters