From 9772ef75252014f4d1e6f68d7fbddf85a6b43e35 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Fri, 22 Sep 2023 22:13:37 +0100 Subject: [PATCH 1/2] Update _index.en.md --- .../integrations/tactical-rmm/_index.en.md | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/content/self-host/client-deployment/integrations/tactical-rmm/_index.en.md b/content/self-host/client-deployment/integrations/tactical-rmm/_index.en.md index dff323d..6612d14 100644 --- a/content/self-host/client-deployment/integrations/tactical-rmm/_index.en.md +++ b/content/self-host/client-deployment/integrations/tactical-rmm/_index.en.md @@ -60,11 +60,12 @@ cd $env:ProgramFiles\RustDesk\ .\RustDesk.exe --get-id | out-host ``` -## RustDesk Set and Get Password (Collector Script needs Custom Agent Field) -```ps +## Create Script to be used as a Check + +``` $ErrorActionPreference= 'silentlycontinue' -$confirmation_file = "C:\Program Files\RustDesk\runonce.txt" +$confirmation_file = "C:\program files\RustDesk\rdrunonce.txt" if ([System.IO.File]::Exists($confirmation_file)) { echo "Confirmation file exists" @@ -72,8 +73,18 @@ if ([System.IO.File]::Exists($confirmation_file)) { } else { + echo "Confirmation file doesn't exists" + exit 1 +} + +``` + +## RustDesk Set and Get Password (Collector Script needs Custom Agent Field) to run on Check Failure +``` $ErrorActionPreference= 'silentlycontinue' +$confirmation_file = "C:\program files\RustDesk\rdrunonce.txt" + net stop rustdesk > null $ProcessActive = Get-Process rustdesk -ErrorAction SilentlyContinue if($ProcessActive -ne $null) @@ -81,14 +92,14 @@ if($ProcessActive -ne $null) stop-process -ProcessName rustdesk -Force } -$rustdesk_pw = (-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_})) +$rustdesk_pw = (-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_})) Start-Process "$env:ProgramFiles\RustDesk\RustDesk.exe" "--password $rustdesk_pw" -wait Write-Output $rustdesk_pw net start rustdesk > null - + New-Item $confirmation_file > null -} + ``` ## RustDesk URL Action From 14786a9964d515208c126baf066b1a62fadbaf65 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Fri, 22 Sep 2023 22:14:50 +0100 Subject: [PATCH 2/2] Update _index.de.md --- .../integrations/tactical-rmm/_index.de.md | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/content/self-host/client-deployment/integrations/tactical-rmm/_index.de.md b/content/self-host/client-deployment/integrations/tactical-rmm/_index.de.md index fa19b03..48e6edf 100644 --- a/content/self-host/client-deployment/integrations/tactical-rmm/_index.de.md +++ b/content/self-host/client-deployment/integrations/tactical-rmm/_index.de.md @@ -60,20 +60,31 @@ cd $env:ProgramFiles\RustDesk\ .\RustDesk.exe --get-id | out-host ``` -## RustDesk Passwort setzen und abfragen (Sammelskript benötigt benutzerdefiniertes Agent-Feld) -```ps +## Erstellen Sie ein Skript, das als Prüfung verwendet werden soll + +``` $ErrorActionPreference= 'silentlycontinue' -$confirmation_file = "C:\Program Files\RustDesk\runonce.txt" +$confirmation_file = "C:\program files\RustDesk\rdrunonce.txt" if ([System.IO.File]::Exists($confirmation_file)) { - echo "Bestätigungsdatei ist vorhanden" + echo "Confirmation file exists" exit 0 } else { + echo "Confirmation file doesn't exists" + exit 1 +} + +``` + +## RustDesk Passwort setzen und abfragen (Sammelskript benötigt benutzerdefiniertes Agent-Feld) +``` $ErrorActionPreference= 'silentlycontinue' +$confirmation_file = "C:\program files\RustDesk\rdrunonce.txt" + net stop rustdesk > null $ProcessActive = Get-Process rustdesk -ErrorAction SilentlyContinue if($ProcessActive -ne $null) @@ -81,14 +92,14 @@ if($ProcessActive -ne $null) stop-process -ProcessName rustdesk -Force } -$rustdesk_pw = (-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_})) +$rustdesk_pw = (-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_})) Start-Process "$env:ProgramFiles\RustDesk\RustDesk.exe" "--password $rustdesk_pw" -wait Write-Output $rustdesk_pw net start rustdesk > null - + New-Item $confirmation_file > null -} + ``` ## RustDesk URL-Aktion