> For the complete documentation index, see [llms.txt](https://documentation.2pintsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.2pintsoftware.com/2pxe-server/4.0/installation/command-line-setup.md).

# Unattended Installation

2PXE Server 4.0 can be installed silently with `msiexec`. Unlike 2PXE Server 3.x, the 4.0 installer does not take a long list of MSI properties for individual settings. Instead, you configure 2PXE once with the **Configure 2PXE** configuration editor, export those settings to a `.2psimport` file, and pass that file to the installer with the `OPTIONS` property.

{% hint style="warning" %}
In-place upgrades from 2PXE Server 3.x to 4.0 are not supported. For upgrade and migration instructions, see [Upgrading to 2PXE Server 4.0](/2pxe-server/4.0/whats-new-and-upgrades/upgrading-to-2pxe-server-4.0.md).

The 3.x MSI properties (such as `INSTALLTYPE`, `SERVICE_USERNAME` and `CONFIGMGRSQL`) are not used by the 4.0 installer.
{% endhint %}

## MSI properties

In addition to the standard Windows Installer options (such as `/qn` and `/l*v`), the installer supports the following properties:

| Property        | Value                                                                                            | Description                                                                                                                                                                                                                                                                 |
| --------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OPTIONS`       | Path to a `.2psimport` file                                                                      | Imports the 2PXE settings from a `.2psimport` file exported from the **Configure 2PXE** configuration editor. If not specified, 2PXE is installed with default settings and must be configured with the editor afterwards.                                                  |
| `AUTOSTART`     | <p><code>1</code> = start the service<br><code>0</code> = do not start the service (default)</p> | After the installation, the 2PXE service is set to **Manual** startup and is not started. Set `AUTOSTART=1` to validate the imported settings, change the service to **Automatic** startup, and start it. Only used when the installation runs completely silently (`/qn`). |
| `INSTALLFOLDER` | Path                                                                                             | The installation folder. The default is `C:\Program Files\2Pint Software\2PXE`.                                                                                                                                                                                             |

## Step 1: Create a settings file

1. Install 2PXE Server 4.0 on a reference server, using either the [manual installation](/2pxe-server/4.0/installation/installation-and-configuration.md) or an unattended installation without `OPTIONS`.
2. Open **Configure 2PXE** from the Start menu and configure the settings needed for your environment. See [Configuring 2PXE Server](/2pxe-server/4.0/configuration/2pxe-config-file.md).
3. Click **Verify** to check the settings.
4. Select **Export** > **Create 2PS import file for MSI only**, and save the file with a name such as `2PXE.2psimport`.

The file contains the settings in a compact JSON format, with any spaces inside values replaced by `%20`. You can open it with a text editor to review the contents.

{% hint style="info" %}
Settings such as **Bind to IP**, **External FQDN override** and the HTTPS certificate thumbprint are usually specific to each server. If you use one settings file for several servers, review these settings, and create a separate file for each server if needed.
{% endhint %}

## Step 2: Run the installation

Copy the MSI and the `.2psimport` file to the target server, and run the installer from an elevated command prompt. For example:

```
msiexec /i TwoPint.TwoPxe.Installer.msi OPTIONS=C:\Temp\2PXE.2psimport AUTOSTART=1 /qn /l*v C:\Windows\Temp\2PXE.Install.log
```

This command:

* Installs 2PXE Server silently (`/qn`), writing a verbose log to `C:\Windows\Temp\2PXE.Install.log`.
* Imports the settings from `C:\Temp\2PXE.2psimport`.
* Validates the settings, sets the **2Pint 2PXE Server** service to **Automatic** startup, and starts it (`AUTOSTART=1`).

{% hint style="warning" %}
The `OPTIONS` value is passed to the configuration editor without quotes, so store the `.2psimport` file in a folder whose path does not contain spaces.
{% endhint %}

When you deploy 2PXE with Configuration Manager or another deployment tool, put the MSI and the `.2psimport` file in the same folder, and use a small `install.cmd` script so that the settings file path is relative to the script:

```
msiexec /i "%~dp0TwoPint.TwoPxe.Installer.msi" OPTIONS=%~dp02PXE.2psimport AUTOSTART=1 /qn /l*v C:\Windows\Temp\2PXE.Install.log
```

## After the installation

* If you did not use `AUTOSTART=1`, or did not install with `/qn`, the service is set to **Manual** startup and is not running. Open **Configure 2PXE**, review the settings, click **Verify** and then **Save**. The editor then sets the service to **Automatic** startup and starts it.
* If the installation fails with `AUTOSTART=1`, the imported settings probably failed validation. Check the installation log, then open **Configure 2PXE** on the server to see which settings are invalid.
* Uninstalling 2PXE Server removes its settings from the registry (`HKLM\SOFTWARE\2Pint Software\2PXE`). Keep your `.2psimport` file if you might need to reinstall.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.2pintsoftware.com/2pxe-server/4.0/installation/command-line-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
