How to repair a corrupted AgentP installation on Windows

In this topic, you will learn how to repair a corrupted AgentP installation to restore full AgentP functionality or to enable AgentP to be uninstalled and reinstalled.

In some cases, the Portnox AgentP service cannot start or enters a continuous restart loop. This behavior usually results from a corrupted or incomplete AgentP installation, missing registry keys, or broken service dependencies. These issues can cause unstable service behavior and network connectivity problems.

Common symptoms include:

  • The AgentP service does not start automatically after system boot.

  • The AgentP service restarts repeatedly, sometimes multiple times per second, as shown in the Event Viewer.

  • Event Viewer or AgentP logs report missing registry keys, such as HKLM\SOFTWARE\Microsoft\IdentityStore\cache and HKLM\SOFTWARE\Microsoft\IdentityStore\identity.

  • Uninstall or repair attempts fail with MSI errors, for example: A program required for this install to complete could not be run.

  • Manually restarting the AgentP service or rebooting the device temporarily restores connectivity.

These symptoms indicate an incomplete installation, corrupted MSI registration, or missing service dependencies that prevent AgentP from initializing correctly.

The most common root causes include:

  • Missing, corrupted, or blocked AgentP executables or custom action files (DLL or EXE), often due to security software.

  • Broken or incomplete Windows Installer registration for AgentP.

  • An inconsistent or incompatible network filter driver installed by AgentP.

  • Corrupted or modified registry entries under HKLM\SYSTEM\CurrentControlSet\Services\PortnoxAgentP or HKLM\SOFTWARE\Classes\Installer\Products.

  • Permission or system-level issues that prevent the service from running under the expected account, such as LocalSystem.

Because of these issues, the AgentP service may fail to initialize, repeatedly restart, disrupt network connectivity, and prevent clean uninstallation or reinstallation. The following sections describe ways to repair the AgentP installation, clean corrupted MSI data, or perform a manual cleanup before reinstalling the agent.

Preconditions:

  • The WMI repository is functional and consistent.

  • Running sfc /scannow reports no system file integrity violations.

  • The issue persists despite system file integrity checks, indicating AgentP-specific corruption.

Repair the AgentP installation

  1. Find the product code of your AgentP installation.
    • Option 1: Use the Registry Editor:

      1. Go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.

      2. Search for Portnox AgentP.

      3. Locate the ProductCode or UninstallString subkey (the GUID in curly braces {} is the product code).

    • Option 2: Use PowerShell:

      Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*Portnox*" } | Select-Object Name, IdentifyingNumber
  2. Run a repair using the original AgentP MSI installer to restore missing binaries, DLLs, and service configuration.
    msiexec /fa {product_code}

    Where product_code is the product code identified in the previous step.