add option to disable remote printer in rustdesk

This commit is contained in:
Stefan Tollkühn
2025-09-18 14:15:25 +02:00
parent ec74d4a2c1
commit 21dfb68eb5
3 changed files with 11 additions and 3 deletions

View File

@@ -15,7 +15,10 @@
Specifies the length of the password to connect to the RustDesk client
.PARAMETER enableAudio
EnableAudio in RustDesk client.
EnableAudio in RustDesk client. (https://rustdesk.com/docs/en/self-host/client-configuration/advanced-settings/#enable-audio)
.PARAMETER enablePrinter
EnablePrinter in RustDesk client (https://rustdesk.com/docs/en/self-host/client-configuration/advanced-settings/#enable-remote-printer)
.EXAMPLE
PS> .\RustdeskInstall.ps1 -rdServer "somehost.example.tld" -rdKey "KeyFromServer="
@@ -38,6 +41,7 @@ param(
[string]$rdKey = $null,
[int]$pwLength = 8,
[bool]$enableAudio = $True,
[bool]$enablePrinter = $True,
[bool]$toNextcloudPassword = $False,
[string]$ncBaseUrl,
[string]$ncUsername,
@@ -174,6 +178,10 @@ local-ip-addr = '$ipAddress'
$rd2Toml += "`nenable-audio = 'N'"
}
if (!($enablePrinter)) {
$rd2Toml += "`nenable-remote-printer = 'N'"
}
#Workaround: Copy permanent password settings from:
# $env:Appdata\RustDesk\config\RustDesk.toml
# to:

View File

@@ -2,4 +2,4 @@
set SRCPATH=%~dp0
cd "%SRCPATH:~0,-1%"
powershell.exe -ExecutionPolicy ByPass .\Rustdesk_1.1.9_uninstall.ps1
powershell.exe -ExecutionPolicy ByPass .\RustdeskInstall.ps1 -rdServer 'resup.bnvb-ingenieure.de' -rdKey "hQdyuLED8CrEXQvEx+enxc0+CgHW7oS2g76V9Sb6mCE=" -pwLength 16 -enableAudio 0 -toNextcloudPassword 1 -ncBaseUrl 'https://cloud.bnvb-ingenieure.de/apps/passwords' -ncUsername 's.tollkuehn@bnvb-ingenieure.de' -ncToken 'tLXwf-7mjTz-8DNoH-nKbMc-3BRGY' -ncFolder 'b7e7b98f-9c4c-49b0-851b-dc4ecac7dd6e'
powershell.exe -ExecutionPolicy ByPass .\RustdeskInstall.ps1 -rdServer 'resup.bnvb-ingenieure.de' -rdKey "hQdyuLED8CrEXQvEx+enxc0+CgHW7oS2g76V9Sb6mCE=" -pwLength 16 -enableAudio 0 -enablePrinter 0 -toNextcloudPassword 1 -ncBaseUrl 'https://cloud.bnvb-ingenieure.de/apps/passwords' -ncUsername 's.tollkuehn@bnvb-ingenieure.de' -ncToken 'tLXwf-7mjTz-8DNoH-nKbMc-3BRGY' -ncFolder 'b7e7b98f-9c4c-49b0-851b-dc4ecac7dd6e'