Windows provides three methods for installing the APM Agent. However, if you intend to profile a .NET Framework application, we recommend using the MSI installer. This approach ensures the Profiler is registered in the Windows Registry, a requirement for .NET Framework applications.

The APM Agent for Windows is supported on Windows Server 2012 or newer.

Follow these steps to install the Raygun Agent using the MSI installer. For a scripted silent installation, refer to the scripted (Method 2) installation instructions.

  1. Download the appropriate MSI installer for your server:

  2. Run the installer and follow the on-screen prompts to complete the installation.

The Raygun APM Agent is installed as a Windows Service, and set to auto-start when installed using the MSI installer. Once the installation is complete, the agent will be running.

For agent configuration and application setup instructions, please refer to the specific Profiler Setup documentation for your application.

Download the latest agent installer from the Agent downloads page and run the installer using msiexec.exe with the /quiet flag.

Optionally you can output the installer log to a file using /log log-file-name.log which helps when diagnosing issues with the installation process.

# Run the installation using msiexec in quiet mode and no system restarts allowed,
# logging the output to a file
msiexec.exe /i RaygunAgent-x64.msi /quiet /norestart /log RaygunAgentInstall.log

The following steps are shown using PowerShell

Use the following PowerShell script to download and extract the Raygun Agent zip file to your file system:

# Set the download & installation directory
$installTo = "${env:ProgramFiles}\Raygun\RaygunAgent\"
$zipFile = "${installTo}\RaygunAgent-Windows-(x64).zip"

# Create the directory if it doesn't exist
New-Item -Path $installTo -ItemType "directory"

# Set the security protocol to TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# Download the Windows zip file
Invoke-WebRequest -Uri "" -OutFile $zipFile

# Extract the zip file to the specified directory
Expand-Archive $zipFile -DestinationPath $installTo

# Remove the downloaded zip file
Remove-Item $zipFile

We recommended installing the Raygun Agent as a Windows Service, especially when running on a Server. This allows the service to start on system boot and restart in the event of a failure.

# Set the default API Key to be registered with Raygun.
$env:Raygun_DefaultApiKey = "[YOUR-API-KEY]"

# Start the Agent
& "${env:ProgramFiles}\Raygun\RaygunAgent\RaygunAgent.exe"
$agentpath = "${env:ProgramFiles}\Raygun\RaygunAgent"
$params = @{
  Name = "RaygunAgent"
  DisplayName = "Raygun Agent"
  BinaryPathName = "${agentpath}\RaygunAgent.exe"
  StartupType = "Automatic"
  Description = "Agent for Raygun APM"

# Create the Service
New-Service @params

# Set the Service to restart on failure
& sc.exe failure $params.Name reset= 30 actions= restart/0/restart/5000/restart/30000

# Start the Service
Start-Service $params.Name

# Register the Agent
& "${agentpath}\rgc.exe" -register [YOUR-API-KEY]

Once the Agent is installed, you can begin profiling your application. Please refer to the Profiler Setup for instructions on setting up the profiler for your Language/Environment.