Command Line Options

The following command line options are available when running HL7Spy:

HL7Spy.exe [-e] [-lf=file(s)] [-mllp=port]

-?|help|h - Prints out the options.
-e (Use Existing): use an existing HL7Spy instance, don't start a new one
-ca|CloseAll - close existing tabs. Only useful with the -e option
-lf (Load File(s)): file(s) - Each -lf call results in a single tab. Multiple files to be placed in a single tab can be separated with a ; (semicolon) 
-mllp (Start MLLP Listener): port - integer port to listen on
-compare: Run the Bulk Compare tool on the last 2 tabs loaded

Note: Option names are case insensitive

Example - Load the file c:\temp\file.hl7 into a currently running instance of HL7Spy:
HL7Spy -e -lf="c:\Temp\file.hl7"

Example - Load 2 tabs with the first tab containing file1.hl7 and file2.hl7 and the second tab containing file3.hl7 and file4.hl7. Close any existing tabs first:
HL7Spy -e -ca -lf="c:\Temp\file1.hl7;c:\Temp\file2.hl7-lf="c:\Temp\file3.hl7;c:\Temp\file4.hl7"

Example - Run the Bulk Compare tool on file1.hl7 and file2.hl7. Close any existing tabs first:
HL7Spy -e -ca -compare -lf="c:\Temp\file1.hl7" -lf="c:\Temp\file2.hl7"

Example - Start HL7Spy are start listening on port 12000 for HL7 messages:
HL7Spy -mllp=12000

HL7Spy.exe -user=licensee -key=licenseKey

-user (User): licensee - the owner of the license. This must match the licensee given to you when the product was purchased
-key (License Key): "LicenseKey" - The license given to you when the product was purchased
-s (silent): - When running from the installer .exe, the installer UI will be hidden

Example - Install a license from the installer:
HL7Spy.20.1.250.exe -s -user="" -key="O5TJfp0z651q61RS83zF.........GsYot8qKuNjw3PWIcOAng=4PH191202"

Uninstalling HL7Spy using Powershell

To automate the uninstall of HL7Spy you can use a Powershell script as shown below. The script should be run as an administrator to give it sufficient privilege to alter the system software.

Powershell Script to Uninstall HL7Spy

Invoke-Command -ScriptBlock {
$Uninst64 = Get-ChildItem -Path HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Get-ItemProperty |
Where-Object {$_.DisplayName -like 'HL7Spy v3.*'} |
Select-Object BundleCachePath
$Uninst64 = $Uninst64.BundleCachePath
$Uninst64 = "$Uninst64".Trim()
if($Uninst64) { Start-Process $Uninst64 -ArgumentList "-uninstall -quiet"}