Devolutions/UniGetUI · error · InvalidOperationException

Custom manager paths are disabled by secure settings.

Error message

Custom manager paths are disabled by secure settings.

What it means

Thrown by IpcManagerMaintenanceApi.SetExecutablePathAsync when the SecureSettings flag AllowCustomManagerPaths is false. Setting a custom manager executable path is a privileged operation gated behind a secure (admin-controlled) setting, so the API refuses it outright when the flag is off, before even validating the path.

Source

Thrown at src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs:74

    public static async Task<IpcManagerMaintenanceActionResult> ReloadManagerAsync(
        IpcManagerMaintenanceRequest request
    )
    {
        ArgumentNullException.ThrowIfNull(request);
        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);
        await ReloadManagerAsync(manager);
        return Success("reload-manager", manager, "reload", "completed");
    }

    public static async Task<IpcManagerMaintenanceActionResult> SetExecutablePathAsync(
        IpcManagerMaintenanceRequest request
    )
    {
        ArgumentNullException.ThrowIfNull(request);
        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);
        if (!SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths))
        {
            throw new InvalidOperationException(
                "Custom manager paths are disabled by secure settings."
            );
        }

        if (string.IsNullOrWhiteSpace(request.Path))
        {
            throw new InvalidOperationException("The path field is required.");
        }

        Settings.SetDictionaryItem(Settings.K.ManagerPaths, manager.Name, request.Path);
        await ReloadManagerAsync(manager);
        return Success(
            "set-manager-executable",
            manager,
            "set-executable",
            "completed",
            $"Configured {manager.DisplayName} to use {request.Path}."
        );

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Enable SecureSettings.K.AllowCustomManagerPaths (requires the secure-settings approval flow, not a normal user setting).
  2. If you cannot enable it, do not use set-manager-executable; rely on PATH-based manager discovery instead.
  3. Confirm the setting is genuinely on via the secure-settings read API before calling.
Defensive patterns

Strategy: validation

Validate before calling

bool allowed = SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths);
if (!allowed) { /* do not call set-manager-executable; surface to user */ }

Try / catch

try { await client.SetExecutablePathAsync(req); }
catch (InvalidOperationException ex) when (ex.Message.Contains("disabled by secure settings"))
{ /* feature is locked off; guide user to enable via secure-settings approval flow */ }

Prevention

When it happens

Trigger: POSTing to set-manager-executable while AllowCustomManagerPaths is disabled in SecureSettings. This is checked before the path-empty check, so even a well-formed request is rejected when the feature is locked off.

Common situations: A locked-down deployment where an administrator disabled custom manager paths for safety. Trying to override a manager path via IPC without first enabling the secure setting. Misunderstanding SecureSettings (admin-gated) vs Settings (user-gated).

Related errors


AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13). Data as JSON: /api/errors/25743c5edb1ea245. Report an issue: GitHub.