> 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/de/knowledge-base/how-to-articles/use-the-custom-installer-in-unattended-setups.md).

# Den benutzerdefinierten Installer in unbeaufsichtigten Setups verwenden

Die Funktion für den benutzerdefinierten Installer unterstützt den unbeaufsichtigten Installationsmodus, der eine automatische Installation und Konfiguration ermöglicht. So verwenden Sie diese Funktion:

### Ein benutzerdefiniertes Installationspaket erstellen

1. Verbinden Sie sich mit Ihrem ***Devolutions Account*** unter ***Datei*** – ***Devolutions Account***.
2. Klicken Sie auf ***Manager für benutzerdefinierte Installer***, wählen Sie die aktuelle Version von Remote Desktop Manager aus und aktivieren Sie das Kontrollkästchen ***Konfiguration mit Passwort im Installationspaket verschlüsseln***.
3. Klicken Sie auf **Erstellen**.

### Das benutzerdefinierte Installationspaket installieren

Das folgende PowerShell-Skript installiert automatisch das zuvor erstellte Paket und fügt das Passwort ein. Beachten Sie, dass das Einfügen des Passworts nur erfolgt, wenn Sie in Schritt 2 das Kontrollkästchen ***Konfiguration mit Passwort im Installationspaket verschlüsseln*** aktiviert haben.

{% hint style="info" %}
Das Skript muss als Administrator ausgeführt werden, andernfalls kann die UAC-Eingabeaufforderung nicht erscheinen.
{% endhint %}

Hier ist das vollständige Skript, das im Format .ps1 gespeichert werden muss:

```
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()
    }
}
```

Bei der Installation des Pakets ist es wichtig, das Passwort auf sichere Weise bereitzustellen. Verwenden Sie dazu eine benannte Pipe, um zu verhindern, dass das Passwort auf die Festplatte geschrieben oder protokolliert wird.

So führen Sie das Skript aus:

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

So übergeben Sie das Passwort aus einer Umgebungsvariablen per Pipe:

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

#### Siehe auch

* [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/de/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.
