Question HitmanPro - Can I interact with it via the command line?

Please provide comments and solutions that are helpful to the author of this topic.

Studynxx

Level 8
Thread author
Verified
Well-known
Jan 20, 2023
429
369
667
I want to script out the installation of HitmanPro. I have googled but I can't find anything related to it.
 
I want to script out the installation of HitmanPro. I have googled but I can't find anything related to it.
HitmanPro Can Be Operated Via Command Line for Automated and Silent Scanning.

Yes, it is possible to run HitmanPro via the command line, offering users the flexibility to automate scanning processes, perform silent scans, and integrate the security tool into various IT management workflows. This functionality is available for both the standard HitmanPro scanner and the more comprehensive HitmanPro.Alert.

A variety of command-line switches, also known as parameters or arguments, can be used to control the behavior of HitmanPro without relying on its graphical user interface. These commands allow for a high degree of automation, making it a valuable tool for system administrators and power users.

Key Command-Line Switches and Their Functions:

Here are some of the most common command-line switches available for HitmanPro and their respective functions:

* /scan: Initiates a standard scan of the system.

* /quiet: Runs the scan in silent mode, with no graphical user interface displayed. This is particularly useful for automated tasks.

* /scanonly: Performs a scan without installing the software on the system. This is ideal for on-demand scanning from a portable version of HitmanPro.

* /log=<path>: Specifies a location to save the scan log file. For example, /log="C:\HMP_Logs\scan.log".

* /clean: Automatically quarantines and removes detected malware without user intervention.

* /lic=<license_key>: Applies a license key to the product.

* /fb: Activates "Force Breach" mode, which is designed to terminate even the most persistent malware.

* /noupdate: Prevents the program from checking for updates before a scan.

Example Usage:
To perform a silent scan and save the log file to a specific directory, you would use the following command:
hitmanpro.exe/scan/quiet/log="C:\Path\To\Logs\"



For a completely silent and automated scan and clean operation, the command would be:
hitmanpro.exe/scan /quiet /clean
 
Last edited:
HitmanPro Can Be Operated Via Command Line for Automated and Silent Scanning
Yes, it is possible to run HitmanPro via the command line, offering users the flexibility to automate scanning processes, perform silent scans, and integrate the security tool into various IT management workflows. This functionality is available for both the standard HitmanPro scanner and the more comprehensive HitmanPro.Alert.

A variety of command-line switches, also known as parameters or arguments, can be used to control the behavior of HitmanPro without relying on its graphical user interface. These commands allow for a high degree of automation, making it a valuable tool for system administrators and power users.

Key Command-Line Switches and Their Functions:

Here are some of the most common command-line switches available for HitmanPro and their respective functions:

* /scan: Initiates a standard scan of the system.

* /quiet: Runs the scan in silent mode, with no graphical user interface displayed. This is particularly useful for automated tasks.

* /scanonly: Performs a scan without installing the software on the system. This is ideal for on-demand scanning from a portable version of HitmanPro.

* /log=<path>: Specifies a location to save the scan log file. For example, /log="C:\HMP_Logs\scan.log".

* /clean: Automatically quarantines and removes detected malware without user intervention.

* /lic=<license_key>: Applies a license key to the product.

* /fb: Activates "Force Breach" mode, which is designed to terminate even the most persistent malware.

* /noupdate: Prevents the program from checking for updates before a scan.

Example Usage:
To perform a silent scan and save the log file to a specific directory, you would use the following command:
hitmanpro.exe/scan/quiet/log="C:\Path\To\Logs\"



For a completely silent and automated scan and clean operation, the command would be:
hitmanpro.exe/scan /quiet /clean
1754675432376.png
 
PowerShell, for security reasons, doesn't automatically run programs from the current directory just by typing their name. You need to explicitly tell it to look in the current location.

To fix this, you need to add .\ before the executable name. The . is a reference to the current directory.

Corrected Command
Try this command instead: .\hitmanpro.exe /scan /quiet

This tells PowerShell to execute the hitmanpro.exe file located in the current directory (C:\Program Files\HitmanPro). This should start the silent scan as you intended.
 
If you are frequently gonna use this tool, you can create environmental variable so that you can just type “hitmanpro.exe /parameterOne /parameterTwo” in run, cmd and so on, without all the time having to change current directory.


Press Win + R to open the Run dialog.
Type sysdm.cpl and press Enter. This opens the "System Properties" window.
Navigate to the Advanced tab.
Click on the Environment Variables... button.
In the bottom pane, labeled "System variables", select the variable you wish to change (e.g., Path) and click Edit....
Modify the variable. (For the Path variable, you would click New to add a new directory).
In this case C:/Program Files/Hitman Pro

You can also create automated scripts.
 
If you are frequently gonna use this tool, you can create environmental variable so that you can just type “hitmanpro.exe /parameterOne /parameterTwo” in run, cmd and so on, without all the time having to change current directory.


Press Win + R to open the Run dialog.
Type sysdm.cpl and press Enter. This opens the "System Properties" window.
Navigate to the Advanced tab.
Click on the Environment Variables... button.
In the bottom pane, labeled "System variables", select the variable you wish to change (e.g., Path) and click Edit....
Modify the variable. (For the Path variable, you would click New to add a new directory).
In this case C:/Program Files/Hitman Pro

You can also create automated scripts.
Well that's why I'm enquiring about cmdline parameters. Thanks
 
Well that's why I'm enquiring about cmdline parameters. Thanks
You can do this script, which runs Hitman Pro scan, clean, quiet, with logs on the C:/Drive and and force breach mode (as they call it) to terminate stubborn malware. Potentially, you can edit arguments and log paths. The script automatically asks for elevation.

Code:
#Requires -RunAsAdministrator

$HitmanProPath = "C:\Program Files\HitmanPro\hitmanpro.exe"
$LogDirectory  = "C:\HMP_Logs"

$LogFile = Join-Path -Path $LogDirectory -ChildPath "scan.log"

if (-not (Test-Path -Path $HitmanProPath -PathType Leaf)) {
    Write-Error "HitmanPro executable not found at '$HitmanProPath'. Please check the path and try again."
    Read-Host -Prompt "Press Enter to exit"
    exit 1
}

if (-not (Test-Path -Path $LogDirectory -PathType Container)) {
    Write-Host -ForegroundColor Yellow "Log directory not found. Creating '$LogDirectory'..."
    try {
        New-Item -Path $LogDirectory -ItemType Directory -ErrorAction Stop | Out-Null
        Write-Host -ForegroundColor Green "Successfully created log directory."
    }
    catch {
        Write-Error "Failed to create log directory at '$LogDirectory'. Please check permissions."
        Read-Host -Prompt "Press Enter to exit"
        exit 1
    }
}

$Arguments = @(
    "/fb",
    "/quiet",
    "/scan",
    "/clean",
    "/log=`"$LogFile`""
)

Write-Host "Starting HitmanPro scan. This may take a while..."
Write-Host "Log file will be saved to: $LogFile"

try {
    $process = Start-Process -FilePath $HitmanProPath -ArgumentList $Arguments -Wait -PassThru -ErrorAction Stop
   
    if ($process.ExitCode -eq 0) {
        Write-Host -ForegroundColor Green "HitmanPro scan completed successfully."
    }
    else {
        Write-Warning "HitmanPro completed with a non-zero exit code: $($process.ExitCode). This may indicate an issue."
        Write-Warning "Please check the log file for details: $LogFile"
    }
}
catch {
    Write-Error "An error occurred while trying to run HitmanPro: $_"
}

Write-Host "Script finished."
Read-Host -Prompt "Press Enter to exit"
 
You can do this script, which runs Hitman Pro scan, clean, quiet, with logs on the C:/Drive and and force breach mode (as they call it) to terminate stubborn malware. Potentially, you can edit arguments and log paths. The script automatically asks for elevation.

Code:
#Requires -RunAsAdministrator

$HitmanProPath = "C:\Program Files\HitmanPro\hitmanpro.exe"
$LogDirectory  = "C:\HMP_Logs"

$LogFile = Join-Path -Path $LogDirectory -ChildPath "scan.log"

if (-not (Test-Path -Path $HitmanProPath -PathType Leaf)) {
    Write-Error "HitmanPro executable not found at '$HitmanProPath'. Please check the path and try again."
    Read-Host -Prompt "Press Enter to exit"
    exit 1
}

if (-not (Test-Path -Path $LogDirectory -PathType Container)) {
    Write-Host -ForegroundColor Yellow "Log directory not found. Creating '$LogDirectory'..."
    try {
        New-Item -Path $LogDirectory -ItemType Directory -ErrorAction Stop | Out-Null
        Write-Host -ForegroundColor Green "Successfully created log directory."
    }
    catch {
        Write-Error "Failed to create log directory at '$LogDirectory'. Please check permissions."
        Read-Host -Prompt "Press Enter to exit"
        exit 1
    }
}

$Arguments = @(
    "/fb",
    "/quiet",
    "/scan",
    "/clean",
    "/log=`"$LogFile`""
)

Write-Host "Starting HitmanPro scan. This may take a while..."
Write-Host "Log file will be saved to: $LogFile"

try {
    $process = Start-Process -FilePath $HitmanProPath -ArgumentList $Arguments -Wait -PassThru -ErrorAction Stop
  
    if ($process.ExitCode -eq 0) {
        Write-Host -ForegroundColor Green "HitmanPro scan completed successfully."
    }
    else {
        Write-Warning "HitmanPro completed with a non-zero exit code: $($process.ExitCode). This may indicate an issue."
        Write-Warning "Please check the log file for details: $LogFile"
    }
}
catch {
    Write-Error "An error occurred while trying to run HitmanPro: $_"
}

Write-Host "Script finished."
Read-Host -Prompt "Press Enter to exit"
Thanks. I was only looking to script out the installation of it.
 
I've figured out that you can install the .exe silently using the "/install" flag. You're welcome to try

But does anybody know (I've googled, no results) how to add shell integration - context menu - for hitmanpro?