> For the complete documentation index, see [llms.txt](https://docs.we360.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.we360.ai/deployment-and-it-ops/deploy/agent-deployment-hub/mass-deployment/command-line-msi.md).

# Command Line / MSI / EXE

Deploy Windows MSI or EXE installers silently, collect installation logs, and verify results before a wider rollout.

Windows installers are available as MSI and EXE packages. Run an EXE directly; use `msiexec.exe` for an MSI. You can install from an elevated PowerShell session or a remote management tool with command-line access.

{% hint style="warning" %}
For direct manual or remote-command installation, use the EXE installer. Use the MSI when your deployment platform requires a Windows Installer package, such as Group Policy Software Installation. Pilot the selected method before wider deployment.
{% endhint %}

## Prerequisites

* The correct Standard or organization-specific Stealth installer from your portal. For a generic Stealth download, complete [Stealth installer preparation](/deployment-and-it-ops/deploy/agent-deployment-hub/download-links.md#important-notes-for-stealth-installer-downloads) first.
* An elevated PowerShell session, or an administrator-controlled task running as SYSTEM.

{% hint style="danger" %}
**Preserve the organization-specific Stealth installer filename.** Its name is tied to your organization's license. Don't give a portal download or prepared installer a different name, and don't allow duplicate-download suffixes such as `(1)` or `(2)`. A generic public download must first receive your organization's filename or configuration through [Stealth installer preparation](https://github.com/zenstack-we360/documentation/tree/main/docs-we360-ai/it-ops/deployment/agent-deployment-hub/download-links.md#important-notes-for-stealth-installer-downloads).
{% endhint %}

## Silent Install

#### EXE

```powershell
$process = Start-Process -FilePath "C:\path\to\<installer-filename>.exe" -ArgumentList '--silent' -Wait -PassThru
$process.ExitCode
```

Replace `C:\path\to\<installer-filename>.exe` with the actual path and filename of your organization's EXE.

The current Standard and Stealth EXEs use `--silent` to suppress installer UI. They don't use the older `/exenoui`, `/quiet`, `/qn`, or `/norestart` EXE switches. Don't assume that silent installation eliminates any required restart. If you use the supplied Stealth helper, first [correct the arguments in your reviewed local copy](/deployment-and-it-ops/deploy/agent-deployment-hub/download-links.md#powershell-stealth-install-helper).

#### MSI

```powershell
$process = Start-Process -FilePath "msiexec.exe" -ArgumentList '/i "C:\path\to\<installer-filename>.msi" /quiet /norestart' -Wait -PassThru
$process.ExitCode
```

Replace `C:\path\to\<installer-filename>.msi` with the actual path and filename of your organization's MSI.

These examples wait for the installer and display its result code. The current EXEs return `0` on success and nonzero on failure. For MSI, `0` is success and `3010` is success with a restart required; `1641` means a restart was initiated. Don't apply MSI return-code meanings to an EXE. Verify the installed version and reporting with [Windows Installation Validation](/deployment-and-it-ops/deploy/agent-deployment-hub/manual-installation/windows-validation.md), rather than relying only on process completion.

## Silent Uninstall (MSI only)

```powershell
$process = Start-Process -FilePath "msiexec.exe" -ArgumentList '/x "C:\path\to\<installer-filename>.msi" /quiet /norestart' -Wait -PassThru
$process.ExitCode
```

## Silent Uninstall (All Apps and Config)

* Download the Zen Cleanup utility from [Deployment and Cleanup Utilities](/deployment-and-it-ops/deploy/agent-deployment-hub/download-links.md#deployment-and-cleanup-utilities).
* Run the EXE file via terminal with Administrator permissions.

## Install with Logging (for Troubleshooting)

On an approved pilot computer, use one of these PowerShell commands to collect installation logs. Replace the installer path with the actual file:

#### EXE logging

```powershell
$logPath = Join-Path $env:TEMP 'endpoint-install.log'
$arguments = '--silent --log-file "' + $logPath + '"'
$process = Start-Process -FilePath "C:\path\to\<installer-filename>.exe" -ArgumentList $arguments -Wait -PassThru
$process.ExitCode
```

The current EXEs use `--log-file`, not the MSI `/l*v` switch. Without an override, they normally write timestamped logs under `%ProgramData%\zs-install\myzen-installer\logs` for Standard or `%ProgramData%\zs-install\zs-installer\logs` for Stealth. If the log folder isn't writable, check the executing account's temporary folder.

#### MSI logging

```powershell
$logPath = Join-Path $env:TEMP 'endpoint-install.log'
$arguments = '/i "C:\path\to\<installer-filename>.msi" /quiet /norestart /l*v "' + $logPath + '"'
$process = Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait -PassThru
$process.ExitCode
```

The log is written to `endpoint-install.log` in the executing account's temporary folder. SYSTEM has a different temporary folder from the signed-in user. For centrally managed deployment, use an existing administrator-controlled log folder on the target computer and retain the full result code.

Installation logs can contain organization configuration and sensitive filenames. Remove license keys, credentials, and sensitive paths before sharing evidence with support. These commands perform installation; they aren't read-only validation.

For MSI switch details, see [Microsoft's `msiexec` reference](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec). The EXE examples above apply to the current installers; don't use legacy installer switches. Pilot the exact installer build and command before deployment; silent execution doesn't establish successful enrollment or reporting.

## Use with remote tools

These commands work with any tool that provides remote command-line access:

* **Remote management tools** with remote shell (for example, `ConnectWise`, `Datto`, or `NinjaRMM`)
* [`PSExec`](https://learn.microsoft.com/en-us/sysinternals/downloads/psexec) for remote execution across the network
* **SCCM** task sequences

The command runs silently with no on-screen feedback. RMM tools may provide their own success/failure reporting.


---

# 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://docs.we360.ai/deployment-and-it-ops/deploy/agent-deployment-hub/mass-deployment/command-line-msi.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.
