# Installing the Agent on Microsoft Windows

Start the Microsoft installer file `agent-23.0.n-setup.exe` and follow the instructions on the screen:

1. On the introduction screen press Next.

2. Read and accept the license agreement and click I Agree.

3. Choose installation location and press Next.

4. The installer will search for a suitable Java Runtime Environment.

   If no suitable Java Virtual Machine is found automatically, click Select Java to choose an installed Java Virtual Machine.

   Press Next to continue if a Java Virtual Machine is defined.

5. To define a custom agent listener port in case the default port (`9051`) does not match, select the Set Agent Port checkbox and enter the custom port. If the port settings are correct proceed by pressing Next.

   | If you change this value, you must set the AgentListenerPort Monitoring Parameter for this Server accordingly. See Maintaining Parameter Sets and Maintaining Parameter Sets.

6. On the next page, options for agent self registration can be specified. Please refer to Installation with automatic Agent registration

7. Read the Windows Firewall configuration rules which will be added to your system. Press Next to proceed.

8. On the next screen, you can define a different service user. The Avantra Agent service by default runs using the `LocalSystem` user account. This user may not be allowed to access network resources. If some of your SAP Systems profile data are located on remote (shared) resources, the SAP System will most likely not be monitored. In this case, it is necessary to change the service user to an operating system user allowed to read the network resources (e.g. the SAP System's `[sid]adm` user).

   | Using the SAP System’s `[sid]adm` as the service user is especially recommended for Java-only SAP System running with a MaxDB.

   If you have chosen the user account press Install to proceed.

9. Wait until Avantra Agent installation is completed. Press Next to proceed.

10. Select Start Avantra Agent to start the windows service now. You can also start Avantra Agent later in Windows Services. Press Finish to finish the installation.

| In case there is any issue with the installation, you can find the log files in `$TEMP{avantra} Installation Logs`.

## Unattended/Silent Installation on Microsoft Windows operating systems

The Avantra Agent can be installed in an unattended (silent) mode. This is useful if the Agent is installed on many servers with scripts.

Following options can be set to configure the installation:

/S

  Required. Start the Agent in silent mode.

/JAVA_PATH

  Required. Path to Java installation directory. Do NOT point to `java.exe` or `jvm.dll`, JAVA_PATH must point to the directory where java is installed.

/PORT

  Required. The port used for the Agent (default is 9051).

/START_SERVICE

  Optional. Set to 1 if the Agent should be started immediately after the installation.

/USER

  Optional. Set the service user. If not set the Local System account user is used.

/PASSWORD

  Optional. Set the password of the service user. Only required if USER is set (see above).

/D

  Optional. Installation path. This setting must be the last! Spaces are allowed. If you use spaces, do not wrap with `""`. If you do not set the path, the Avantra Agent will be installed to `%ProgramFiles%\syslink\agent`.

Example 1. Install the Agent into the default directory

    agent-23.0.n.-setup.exe /S /JAVA_PATH="C:\Program Files\Java\jre1.8.0_92" /PORT=9051

Example 2. Install the Agent into a different directory and start automatically

    agent-23.0.n-setup.exe /S /JAVA_PATH="C:\Program Files\Java\jre1.8.0_92" /PORT=9051 /START_SERVICE=1 /D=C:\syslink