---
title: "In running post setup apply script from the Gateway server, inside hooks directory. Is there any in-built variable that auto detects the gateway name?"
description: "No variable automatically detects the Gateway name in post setup apply scripts. The available environment variables do not include any that identify the Gateway server."
url: "https://docs.itrsgroup.com/docs/faq/geneos/15488886956957-geneos-in-running-post-setup-apply-script-from-the-gateway-server-inside-hooks-directory-is-there-any-in-built-variable-that-auto-detects-the-gateway-name/index.html"
---
## Question

- In running post setup apply script from the Gateway server, inside hooks directory. Is there any variable that we can use for gateway name?

## Your Answer here

- As seen in the documentation, There are no variable that autodetects the gateway name.
- List of the available environment variables, under post setup apply

| **Environment Variable** | **Information Stored** | **Example** |
| --- | --- | --- |
| \_COMMENT | A comment typed in by the setup editor in the Gateway Setup Editor when the setup was changed | Added new Managed Entity |
| \_USER | User name of the setup editor | This is the Genos username as described in *Authentication* |
| \_WORKSTATION | The machine ip address where the Setup was edited | 183.23.23.12 |
| \_FILES | An XML Document containing the information about the state of all of the setup files | ``` <setup> <files> <file> <main/> <path>gateway.setup.xml</path> </file> </files> </setup> ``` |

## Related Articles

- Any existing FAQ / external website

<https://docs.itrsgroup.com/docs/geneos/current/administration/geneos_advancedfeatures_tr/index.html#data-passed-to-the-hook>


