# Passing Parameters as Arguments

Here is how to perform a Silent Install using `msiexec` to pass parameters as arguments.

### **Prerequisites**

* Make sure to use the `.msi` installer files to run the `msiexec` commands. For example, for **Thinfinity**® **Workspace** the installer would be: `[installer_file.msi]` .
* Make sure to run your command prompt with administrator privileges.

### Installing Thinfinity Workspace via Silent Installation Method

To install a `.msi` file silently, the required argument is `/q` or `/quiet` which allows the installation to run silently, without displaying the user interface.

```
msiexec /i [installer_file.msi] /q
```

Additionally, you can use the `/log` argument followed by a file name to generate a log of the installation process. For example:

```powershell
msiexec /i [installer_file.msi] /q /log myLog.log
```

To set the role of the installed server, use the `CMDLINE="/SetInstanceRole:X"` parameter as shown in the following paragraphs.&#x20;

{% hint style="info" %}
**Info**

If the ***Role*** parameter is not specified, **Thinfinity Workspace** will be configured in *All-in-one* mode by default.
{% endhint %}

<details>

<summary>Set Thinfinity Workspace in All Components mode</summary>

Execute the following command to configure **Thinfinity Workspace** in an All-in-one deployment mode.

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:0"
```

</details>

<details>

<summary>Set Thinfinity Workspace as Gateway</summary>

When configuring **Thinfinity Workspace** as a Gateway, it is necessary to specify its role by setting the `service.role` parameter to `1` using the `SetInstance` command.

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:1"
```

```powershell
 msiexec /i [installer_file.msi] /q /l*v ServerGW.log CMDLINE="/SetInstance services.role:1"
```

</details>

<details>

<summary>Set Thinfinity Workspace as Broker Primary/Secondary</summary>

When configuring **Thinfinity Workspace** as a Broker, it is necessary to specify its role by setting the `service.role` parameter.  For **Primary Broker**, set the role in 2, and for **Secondary Broker set** the role in 3.&#x20;

* Use the next command to set the **Thinfinity Workspace** **Primary Broker**:

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:2"
```

* Use the next command to set the **Thinfinity Workspace** **Secondary Broker**:

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:3"
```

</details>

<details>

<summary>Set Thinfinity Workspace as VirtualUI Agent</summary>

Execute the following command to set **Thinfinity Workspace** as a **VirtualUI Agent**:

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:4"
```

</details>

<details>

<summary>Set Thinfinity Workspace RemoteAD</summary>

Execute the following command to set **Thinfinity Workspace** as a **RemoteAD**:

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:5"
```

</details>

<details>

<summary>Set Thinfinity Workspace as an Agent</summary>

Execute the following command to set **Thinfinity Workspace** as a **Agent**:

```powershell
msiexec /i [installer_file.msi] /q CMDLINE="/SetInstance services.role:6"
```

</details>

Thinfinity Desktop Client also supports silent installation. Use the following command line to initiate the installation:&#x20;

<pre class="language-powershell"><code class="lang-powershell"><strong>msiexec /i [installer_file.msi] /q WORKSPACEURL="https://myServerUrl.com"
</strong></code></pre>

The `WORKSPACEURL` parameter is optional and can also be configured post-installation once the Desktop Client has been set up.

### Post-Installation Configuration Procedures

Following the completion of the installation process, the node’s assigned role can be also be configured or adjusted using the **Configuration Manager** utility:

1. Launch the **Configuration Manager** application.
2. Navigate to the **Services** tab.
3. Select and assign the appropriate role from the available options.
4. Do not forget to click **Apply** to save the changes.
