# Run .exe/.msi/.bat/.lnk files

An executable can be used to start or install a program in a bottle. In Bottles you can run these files in two ways:

* from the **GUI** using the **Run executable** feature
* using the **CLI** (this can be useful if you don't want to show Bottles GUI)

### Launch from GUI

Let's go into the details of the bottle of our interest (read [here](https://docs.usebottles.com/getting-started/first-run#your-first-bottle) how to create one if you don't have one).

Under the bottle name we find the **Run executable** button:

![Bottle - Details](https://1779667294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQH3F0OVam8XE3i-Jc-%2Fuploads%2Fgit-blob-6c68180cb3768a247e5b18c1af4e7c75b03165ac%2FMain.png?alt=media)

Pressing it will open a window from which to select the executable of our interest, once selected it will be executed in the bottle.

#### Launch with arguments

Some applications require you to start with arguments. As you can see from the previous image, next to Run executable there is an arrow, by pressing it you can select the item Run with arguments. Once pressed, a screen will appear where you can enter our arguments:

![Bottle - Details - Run executable with arguments](https://1779667294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQH3F0OVam8XE3i-Jc-%2Fuploads%2Fgit-blob-286591d40becbc2073c4ea3806da2cf11f362ae4%2FRunWithArguments.png?alt=media)

Once finished, we press on Run and select the executable to start it in the bottle.

### Launch from CLI (supports .lnk)

To start an executable from the CLI, we can proceed in two ways.

Simply **passing the path of the executable** to the command to start Bottles, the GUI will appear asking which bottle to start it. It is also possible to tell Bottles from the preferences to close automatically after starting the executable.

{% hint style="warning" %}
The following statement is for the Unstable version of Bottles only and will be officially implemented in version 2021.7.28.
{% endhint %}

Otherwise you can avoid the GUI by specifying the parameters:

{% tabs %}
{% tab title=".EXE/.MSI/.BAT" %}

```bash
bottles -b bottle_name -e /full/executable/path
```

| parameter         | hint                                               | required |
| ----------------- | -------------------------------------------------- | -------- |
| `-b --bottle`     | the bottle name                                    | ✅        |
| `-e --executable` | the executable full path (supports .exe/.msi/.bat) | ✅        |
| {% endtab %}      |                                                    |          |

{% tab title=".LNK" %}

```bash
bottles -b bottle_name -l /full/lnk/path
```

| parameter     | hint              | required |
| ------------- | ----------------- | -------- |
| `-b --bottle` | the bottle name   | ✅        |
| `-l --lnk`    | the lnk full path | ✅        |
| {% endtab %}  |                   |          |
| {% endtabs %} |                   |          |

{% hint style="info" %}
Note: use `flatpak run com.usebottles.bottles` instead of `bottles` for flatpak.
{% endhint %}

In this way the Bottles GUI will not be displayed, useful if we want to create a custom Desktop Entry to start our favorite applications.
