Create an installer more suitable for non-technical folks

The standard method of installing Level requires pasting a one-liner into Powershell. In some circumstances, this might seem foreign and confusing to those not familiar with the basics of a command-line interface. In these cases, it might be beneficial to wrap the install command into a batch file.

The steps

  1. Create a new plaintext file and paste the following:
    PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '$env:LEVEL_API_KEY = ''PASTE-YOUR-API-KEY-HERE''; Set-ExecutionPolicy RemoteSigned -Scope Process -Force; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr -useb https://downloads.level.io/install_windows.ps1 | iex' -Verb RunAs}"
  2. Replace PASTE-YOUR-API-KEY-HERE with your Level API key revealed from the Install New Agent button. Once you have done this, the command should look like this:
    PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '$env:LEVEL_API_KEY = ''Dp2jfj39Jj3k023nBB2m3soas4''; Set-ExecutionPolicy RemoteSigned -Scope Process -Force; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr -useb https://downloads.level.io/install_windows.ps1 | iex' -Verb RunAs}"
  3. Save the text file with a .bat extension. Something like Install-Level.bat is fine!
  4. Share the file with your team so that they can install the agent by double-clicking the file.

End-users will not be able to install the Level agent unless they have administrative rights on their computers.