> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/administrator-docs/agent-setup/installation-methods/windows-installation.md).

# Windows installation

### Interactive setup

Use the Windows installer when you want an interactive setup on a Windows host.

{% stepper %}
{% step %}

#### Download the installer

On the Releases page, download the latest Windows setup executable :&#x20;

<a href="https://github.com/OCSInventory-NG/OCSInventory-Agent-Rework/releases" class="button primary" data-icon="download">Download precompiled Windows binaries</a>

Then double-click the file to start the installer.

{% hint style="info" %}
Windows may prompt you to run the installer as an administrator.
{% endhint %}
{% endstep %}

{% step %}

#### Choose the setup language

English and French are currently supported.
{% endstep %}

{% step %}

#### Start the installation

On the welcome screen, click **Next**.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2Fa8H4auCUKZbLRAbsW8PU%2Fimage.png?alt=media&amp;token=cc054c69-d591-4835-9947-e3349e6aef91" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Accept the license agreement

Accept the license agreement, then click **Next**.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FGRMyvtqCiNL99A7jQ9ky%2Fimage.png?alt=media&amp;token=ced3942d-4dc6-4ede-8a0f-098d9989c414" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Configure the agent

Fill in the agent settings:

* **URL:** server URL.
* **Username:** user account with permission to add, update, and view inventory. See [Groups and permissions](/administrator-docs/server-setup/configuration/basics/groups-and-permissions.md).
* **Password:** password for that user.
* **Certificate:** `.pem` or `.crt` certificate to use for HTTPS connections.
* **Validate certificate:** enable this option to verify the server certificate.

{% hint style="warning" %}
Configuration files use JSON syntax. In `config.json`, always write Windows paths with forward slashes (e.g., `C:/ProgramData/OCSInventory-Agent`) rather than backslashes. This applies to both the interactive installer and silent installs.
{% endhint %}

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FUAbgamXNxHIUhLfLrXhY%2Fimage.png?alt=media&amp;token=e08c4cbb-b9d7-44bb-8142-20daf27fe701" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Configure inventory settings

Set the agent inventory options:

* **Inventory mode**
* **Log level**

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FYbpyLmqywdLDu6v5HI0L%2Fimage.png?alt=media&amp;token=c5531f0b-705b-44fc-95b7-bf226b7217eb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Choose how the agent runs

Choose whether the agent should run as a Windows service.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FbZkONP945ilRwPrvgJ2f%2Fimage.png?alt=media&amp;token=9a4841ad-ebac-446e-a910-dfc9eb8a6931" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Select the installation folder

Choose the installation destination.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2Fhk136eRsuuijErRt9XaL%2Fimage.png?alt=media&amp;token=029a15bc-96d8-4693-8ed9-ee85928fafed" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Install the agent

Confirm the installation by clicking **Install**.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FpNLmzvFhpYWxTWtMzQPM%2Fimage.png?alt=media&amp;token=67890255-3c76-4cb1-9f11-6bf4471263d7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Finish the setup

Click **Finish** to exit the installer.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2F9mhBrAoe4oPNGna7Npvh%2Fimage.png?alt=media&amp;token=032e3c4a-f7a1-4203-a89c-df94fab42cb5" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Silent installation

The setup is an Inno Setup package, so it accepts the standard silent switches plus the agent parameters, for mass deployment:

```
OCSInventory-Agent-Setup-3.0.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART ^
  /LOG="C:\Windows\Temp\ocs-setup.log" ^
  /URL=http://server_ip:port ^
  /USERNAME=username ^
  /PASSWORD=password ^
  /MODE=1 ^
  /LOG_LEVEL=3 ^
  /SERVICE=1
```

The agent parameters are `/URL=`, `/USERNAME=`, `/PASSWORD=`, `/MODE=0-4`, `/LOG_LEVEL=0-4`, `/CERTIFICATE="path"`, `/BYPASS_CERT=0|1`, `/SERVICE=0|1` and `/NOW=0|1` (run a single inventory right after the install).&#x20;

Check `C:\ProgramData\OCSInventory-Agent\config.json` and the service state after deployment:

```
Get-Content 'C:\ProgramData\OCSInventory-Agent\config.json'
Get-Service 'OCSInventory Agent'
```

{% hint style="info" %}
Reinstalling over an existing version is supported: the setup silently runs the previous uninstaller first. The uninstaller removes the service and the program files but keeps `C:\ProgramData\OCSInventory-Agent`, and the new install then rewrites `config.json` from the parameters passed, so inventory data survives while the configuration is replaced.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.ocsinventory-ng.org/administrator-docs/agent-setup/installation-methods/windows-installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
