﻿# Windows Silent and Bulk Installation

This guide explains how to deploy the Windows application silently and at scale using MSI and EXE distribution methods.

!!! note
    For silent, bulk, MDM, and administrative deployments, MSI is generally the preferred and more versatile method.

## MSI Installation Options

The MSI installer supports several user-interface levels, per-user vs. per-machine scope, administrative extraction, and uninstallation methods.
The examples below use the sample file name `AcrobitsClient.msi`; adjust as needed.

### Basic Install (Default UI)

Installs the application using the default Windows Installer behavior.

```bash
msiexec /i AcrobitsClient.msi
```

### Silent Mode (No UI)

Use this for a fully invisible installation with no prompts or interface shown to the user.

```bash
msiexec /i AcrobitsClient.msi /quiet
```

### Passive Mode (Minimal UI)

Use this for unattended installs where you want to show a progress bar only, without user interaction.

```bash
msiexec /i AcrobitsClient.msi /passive
```

### Install for All Users (Per-Machine)

Run Command Prompt as an administrator to install for all users.
Otherwise, the per-machine install may fail or silently fall back to per-user.

```bash
msiexec /i AcrobitsClient.msi ALLUSERS=1
```

Combine with quiet mode if desired:

```bash
msiexec /i AcrobitsClient.msi ALLUSERS=1 /quiet
```

### Administrative Installation (Network Extraction)

An administrative installation extracts the application's files into a network-shareable folder.
It does not install the application on the local machine; it prepares the files for deployment to multiple users or systems.

```bash
msiexec /a AcrobitsClient.msi
```

This command prompts for a network path where the extracted installation files should be placed.

## MSI Uninstall Options

You can uninstall the application using the MSI installer from the command line, either with the original `.msi` file or the Product Code GUID.

### Uninstall Using the MSI File

```bash
msiexec /x AcrobitsClient.msi
```

### Uninstall Using the Product Code

If you do not have the `.msi` file, use the Product Code, which is a unique identifier for the installed product.
You can find it in the registry or via PowerShell.

```bash
msiexec /x "{PRODUCT-CODE-GUID}"
```

### How to Find the MSI Product Code

PowerShell example to list installed products and their identifiers:

```powershell
Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*<name>*" } | Select-Object Name, IdentifyingNumber
```

Replace `<name>` with the display name of the installed app.
The `IdentifyingNumber` in the output is the Product Code GUID.

## MSI Installation Additional Arguments

These arguments can be combined with any install or uninstall mode: default, passive, or silent.

### Restart Behavior

| Option | Description |
| --- | --- |
| `/norestart` | Prevents automatic system restart |
| `/forcerestart` | Forces reboot after the process completes |
| `/promptrestart` | Prompts the user to restart if needed |

### Examples

Install the app in passive mode and force a restart:

```bash
msiexec /i AcrobitsClient.msi /passive /forcerestart
```

Uninstall the app silently with logging and without restart:

```bash
msiexec /x AcrobitsClient.msi /quiet /norestart /l*v uninstall.log
```

## Silent EXE Installation

While MSI is generally preferred, you can still perform a fully silent EXE install.
The following command installs without prompts and can target all users:

```bash
installer_name.exe /S /AllUsers /D=<path>
```

Where:

- `/S` installs the application silently without prompts.
- `/AllUsers` installs the application for all users with access to the folder specified by `/D`.
- `/D` specifies the destination path where the application is installed.