================================================================================
  Defendrix v2.0.1 - Installation & Deployment Guide
  (c) RavenSoftworks
================================================================================

CURRENT DISTRIBUTION STATUS
---------------------------
The exact current artifact inventory is declared by the adjacent
Defendrix-Release-Evidence.json. Local engineering builds may include
DefendrixSetup-v2.0.1.exe as well as the portable and administrator ZIPs, but
the website may explicitly publish an unsigned manual download. Windows may show
Unknown publisher. A checksum checks file integrity; it does not establish a
trusted publisher identity or make the application unmodifiable. Verify the exact
artifact and current-run evidence. Signed automatic updates remain disabled for
unsigned builds; the signed Production build requirements are separate.

PORTABLE EVALUATION
-------------------
1. Verify Defendrix-Portable.zip against its adjacent .sha256 sidecar and the
   current Defendrix-Release-Evidence.json before extracting it.
2. Extract the complete archive to a trusted local folder. Do not run a loose
   Defendrix.exe copied away from its manifest and dependency set.
3. Run Defendrix.exe as administrator. The portable package does not register
   Add/Remove Programs, install an uninstaller, or configure automatic startup.
4. On first launch, the Setup Wizard appears:
     - "Getting things ready" splash
     - "Welcome to Defendrix" intro
     - Enter the DFX license key you were issued
     - Create a local username + password for this device
   The wizard contacts the licensing server, claims a seat, and opens the
   main UI.

SIGNED INSTALLER DEPLOYMENT
---------------------------
1. Run only a Defendrix setup whose RavenSoftworks publisher signature and
   release evidence you have verified. Run the selected installer as administrator.
2. Click through the wizard. Accept the default install location
   (C:\Program Files\Defendrix).
3. Leave "Start at boot" checked if continuous protection is required. Enable
   the LAN firewall task only on managed private/domain networks that use the
   fleet protocol. The installer does not add Microsoft Defender exclusions or
   disable Defender protections.

SILENT INSTALL (signed installer only)
--------------------------------------
From an elevated cmd or PowerShell:

    DefendrixSetup-v2.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

Optional flags:
    /LOG="C:\install.log"        write a setup log
    /TASKS="autostart,firewallrule"     pick which tasks to run

To uninstall silently while KEEPING the HWID-locked device seat (default):
    "C:\Program Files\Defendrix\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

Keep preserves protected ProgramData licensing/identity state and separately
provisioned HKLM Secrets. Reinstalling Defendrix on the same hardware can resume
the remembered, HWID-locked seat without creating a replacement seat.

To uninstall silently and PERMANENTLY DELETE this device's seat:
    "C:\Program Files\Defendrix\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DELETEDEFENDRIXSEAT

The destructive switch passes no license key, token, HWID, or device identity
on the command line. Defendrix authenticates from its protected local state. If
the licensing server cannot confirm deletion or local sign-out cannot be
verified, the explicit destructive silent uninstall stops before cleanup with a
nonzero result. If the server confirms deletion but local sign-out cleanup fails,
the result states that the seat is permanently deleted and never describes it as
kept. An interactive uninstall always asks whether to permanently delete the
seat and labels that choice irreversible; choosing No keeps the seat and local
identity. Confirmed permanent deletion removes protected ProgramData and the
Defendrix provisioning registry branch, including separately provisioned Secrets.

ACCOUNT AND SEAT CONTROLS
-------------------------
"Sign out" clears the current user session but retains the activated,
hardware-bound device seat so the same device can sign in again. "Permanently
delete this seat" requires the current local account password and two explicit
confirmations, authenticates the current device from protected local state,
commits an irreversible server tombstone, clears local activation and sign-in
state, and then exits Defendrix. The deleted seat cannot be restored with Allow
Again or by reinstalling on the same device.

NOTE: Even with a silent install, the per-device Setup Wizard still appears on
first launch unless an administrator runs Tools\Set-DefendrixProtectedProvisioning.ps1
before launching Defendrix.exe. The helper stores the DFX key and, only when a
separate fleet service is explicitly configured, its fleet secret under the
ACL-protected canonical HKLM Secrets subkey; it can enable unattended activation.
Legacy root values and client environment overrides are rejected.
Production consumer licensing is anchored to https://ravensoftworks.com over
outbound HTTPS. Explicit Staging is an isolated developer-validation mode; it
never bypasses license, device, token, user, HWID, or role admission and must not
be used for distributed installs or to expose a local service through a tunnel.

WHAT THE INSTALLER DOES
-----------------------
- Installs Defendrix.exe, its audited runtime dependency closure, the Assets
    tree, the release manifest, README, and application icon
- Creates Start Menu shortcuts (and optional desktop shortcut)
- Registers an elevated (HighestAvailable) scheduled task so Defendrix autostarts
    at logon even after a silent/enterprise install. Verify with:
    schtasks /Query /TN DefendrixLogonKeeper
    (Defendrix.exe is requireAdministrator, so a plain HKLM Run value would be
    silently suppressed by Windows at logon - the scheduled task is the real channel.)
- (Optional) Allows UDP/50844 inbound + outbound through Windows Firewall
    (the fleet protocol port) and HTTPS/443 outbound (license check + remote
    support via rendezvous)
- Registers itself in Add/Remove Programs

WHERE THINGS LIVE AFTER INSTALL
-------------------------------
    C:\Program Files\Defendrix\           - install folder (read-only to users)
        Defendrix.exe                     - endpoint protection client
        Assets\                           - application assets
        Defendrix-Release-Manifest.json   - payload hashes and file sizes
        unins000.exe                      - uninstaller
    C:\ProgramData\Defendrix\             - machine-scoped protected data
    User profile Defendrix folders        - encrypted settings and local state

================================================================================
  RECYCLING-COMPANY MULTI-SITE DEPLOYMENT
================================================================================

Defendrix is licensed per seat. One license key (DFX-...) covers a fleet of
N seats; each refurbished desktop activates one seat on first run.

A license key can cover devices at multiple physical sites. Fleet and LAN
features require secure server provisioning and authenticated peers on a
private or domain network. If discovery, server reachability, or identity
validation fails, the related LAN feature reports a degraded state instead of
silently claiming protection.

ROLLING OUT TO A NEW SITE WITH A SIGNED INSTALLER
-------------------------------------------------
1. Confirm internet access to the licensing server (HTTPS/443 outbound).
2. Push the verified DefendrixSetup-v2.0.1.exe to each desktop via your imaging tool,
   PsExec, SCCM, or RMM. Use the /VERYSILENT flag.
3. On first launch, an operator enters the license key once per device
   (or pre-seed via registry as noted above).
4. After activation, open the Network tab and confirm that it reports the
   expected LAN role and a healthy last heartbeat. Investigate a degraded or
   unassigned state before relying on coordinated gateway observation.

LAN PROTECTION MASTER - HOW IT WORKS
------------------------------------
One eligible Defendrix device can coordinate router/gateway observation for a
LAN while other endpoints stand down from duplicate work. Coordination uses
the configured licensing service and authenticated fleet messages. The active
role, last heartbeat, and degraded state remain visible to operators.

Gateway-MAC changes are evidence of a network change; they are logged and
correlated with other signals. They are not treated as proof of an attack by
themselves. Administrators should verify fleet identity and network scope after
router replacement, VLAN changes, or prolonged server outages.

================================================================================
  REMOTE SUPPORT
================================================================================

Remote support is disabled by default. An administrator must enable it for the
device, satisfy the configured administrator allowlist, and obtain local user
consent for the session.

1. The end user opens Defendrix on the device. The Support tab shows a
   9-digit Connection ID (e.g. "742 318 905").
2. The admin opens Defendrix, goes to Support, types that 9-digit ID into
   the Connect box, clicks Connect.
3. A time-bounded consent dialog appears on the device. The user explicitly
   accepts or rejects the request.
4. An accepted session negotiates adaptive screen updates. Keyboard/mouse,
   clipboard, chat, and file-transfer capabilities remain subject to the
   endpoint policy and authenticated session state.

Defendrix attempts an authenticated direct path on eligible LANs and can use
the configured rendezvous service across networks. Transport availability,
latency, and frame rate depend on policy and network conditions.

To end the session: admin clicks "End session" or closes the window. The
endpoint revokes session state and stops accepting control frames.

================================================================================
  LICENSE ISSUANCE & SEAT MANAGEMENT (ADMIN OPERATIONS)
================================================================================

Production license keys, device seats, and customer access are authoritative at
https://ravensoftworks.com. Use the authenticated RavenSoftworks administration
console and API for production issuance and seat operations. Consumer endpoints
connect directly to that first-party authority over outbound HTTPS/443; they do
not require ngrok, an inbound tunnel, or a customer-hosted license server.

Defendrix-Admin.zip is a separate, optional offline/lab authority. It is NOT
installed on endpoints, is NOT a production bridge, and does not synchronize its
keys or seats into ravensoftworks.com. Its listeners must remain bound to
127.0.0.1; never publish or tunnel them to the Internet. Use it only for isolated
local testing and recovery exercises with non-production data. Its local UI can:

- Issue a new license key for a customer / fleet (specify seat count,
  expiration days, tier).
- See each device that has activated against the key (machine name, IP,
  last-seen time, app version).
- Free a seat - e.g. when a desktop is decommissioned. The device picks
  this up on its next successful licensing heartbeat:
     * Modal shown: "Your seat was freed by an administrator..."
     * Local state wiped (RememberMe, token, HWID bindings).
     * Next launch fires the setup wizard for re-activation with a new key.
- Allow Again - undo a reversible local-lab revocation if a device was freed by
  mistake. It cannot reverse a permanent self-seat deletion.
- Extend the license by +365 days.
- Revoke the entire key (all attached devices lose access).
- Permanently delete the key (prefer Revoke when rollback may be needed).

For production devices, free a decommissioned seat in the authenticated
ravensoftworks.com administration console before wiping the disk. This returns
the seat to the correct production pool for the next device.

================================================================================
  TROUBLESHOOTING
================================================================================

"Session denied: Timeout" when remote-connecting
    Confirm remote support is enabled, the administrator is allowed, the
    endpoint is online, and the user accepted within the displayed consent
    window. Review the Defendrix event log on both endpoints for RemoteSupport
    entries.

"License key not found" / "seat revoked by admin"
    The local state has been wiped; the wizard will fire on next launch.
    Either re-enter the same key (if admin used Allow Again) or enter a
    new key.

"This device is the LAN protection master" missing on Network tab
    The licensing server may be unreachable, fleet authentication may have
    failed, or another eligible endpoint may hold the role. Check HTTPS/443
    outbound access, the last heartbeat, and the event log.

"RouterGuard degraded: SendARP failed"
    Defendrix needs to be running as administrator to query the ARP cache.
    Right-click Defendrix.exe -> Run as administrator. Without that access,
    gateway-MAC monitoring is degraded; other modules report their own health.

================================================================================
  SUPPORT
================================================================================

Email:   support@ravensoftworks.com
Web:     https://ravensoftworks.com/support
Version: 2.0.0
