> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/fr/knowledge-base/how-to-articles/use-the-custom-installer-in-unattended-setups.md).

# Utiliser l'installateur personnalisé dans les installations sans surveillance

La fonctionnalité d'installateur personnalisé prend en charge le mode d'installation sans assistance, qui permet l'installation et la configuration automatiques. Voici comment utiliser cette fonctionnalité :

### Générer un paquet d'installation personnalisé

1. Connectez-vous à votre ***Devolutions Account*** dans ***Fichier*** – ***Devolutions Account***.
2. Cliquez sur ***gestionnaire d'installateur personnalisé***, sélectionnez la version actuelle de Remote Desktop Manager, puis cochez la case ***Chiffrer la configuration avec un mot de passe dans le paquet d'installation***.
3. Cliquez sur **Créer**.

### Installer le paquet d'installation personnalisé

Le script PowerShell suivant installe automatiquement le paquet généré précédemment et injecte le mot de passe. Notez que l'injection du mot de passe ne se produit que si vous avez coché la case ***Chiffrer la configuration avec un mot de passe dans le paquet d'installation*** à l'étape 2.

{% hint style="info" %}
Le script doit être exécuté en tant qu'administrateur, sinon l'invite UAC ne peut pas apparaître.
{% endhint %}

Voici le script complet à enregistrer en format .ps1 :

```
param (
    [Parameter(Mandatory = $true, Position = 0, HelpMessage = "Path to MSI for Remote Desktop Manager")]
    [ValidateNotNullOrEmpty()]
    [string]
    $MsiPath,
    [switch]
    $AskPassword,
    [parameter(ValueFromPipeline)][string]$password
)
function Read-Password {
    param (
        [string]$Prompt = "Enter Password"
    )
    if ($password) {
        $securePassword = ConvertTo-SecureString -AsPlainText -Force $password
    }
    else {
        $securePassword = Read-Host -AsSecureString -Prompt $Prompt
    }
    $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto(
        [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($securePassword)
    )
    return $password
}
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (!$currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
    Write-Warning "Not running as administrator. You may run into issues"
}
& 'msiexec.exe' /i "${MsiPath}" /qn
if ($AskPassword) {
    $password = Read-Password
    $pipeHandle = [System.IO.Pipes.NamedPipeClientStream]::new('.', 'DevolutionsUpdater', [System.IO.Pipes.PipeDirection]::Out)
    try {
        $pipeHandle.Connect(15000)
        $passwordBytes = [System.Text.Encoding]::UTF8.GetBytes($password)
        $pipeHandle.Write($passwordBytes, 0, $passwordBytes.Length)
        $pipeHandle.Flush()
    }
    catch {
        Write-Error "Failed to connect to installer instance. Is the installer running with administrator or is RDM already installed?"
    }
    finally {
        $pipeHandle.Close()
    }
}
```

Lors de l'installation du paquet, il est important de fournir le mot de passe de manière sécurisée. Pour ce faire, utilisez un canal nommé afin d'éviter que le mot de passe soit écrit sur le disque ou journalisé.

Pour exécuter le script :

```
PS C:\WINDOWS\system32> . '<Path to above shown .ps1 script>' '<Path to RDM msi>' -AskPassword
```

Pour transmettre le mot de passe à partir d'une variable d'environnement :

```
PS C:\WINDOWS\system32> echo $env:MY_PASSWORD | & 'C:\Temp\RdmInstall.ps1' 'C:\Temp\Setup.RemoteDesktopManager.2024.3.0.0.msi' -AskPassword
```

#### Voir aussi

* [Devolutions Academy - How to Use the Custom Installer](https://academy.devolutions.net/student/page/2397676-how-to-use-the-custom-installer?sid=2202ce15-ae72-4051-b6d9-0a203c58d229\&sid_i=0)


---

# 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://docs.devolutions.net/rdm/fr/knowledge-base/how-to-articles/use-the-custom-installer-in-unattended-setups.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.
