mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-01-13 17:58:18 +01:00
Update _index.en.md
This commit is contained in:
parent
9ba3d79bde
commit
9772ef7525
@ -60,11 +60,12 @@ cd $env:ProgramFiles\RustDesk\
|
|||||||
.\RustDesk.exe --get-id | out-host
|
.\RustDesk.exe --get-id | out-host
|
||||||
```
|
```
|
||||||
|
|
||||||
## RustDesk Set and Get Password (Collector Script needs Custom Agent Field)
|
## Create Script to be used as a Check
|
||||||
```ps
|
|
||||||
|
```
|
||||||
$ErrorActionPreference= 'silentlycontinue'
|
$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)) {
|
if ([System.IO.File]::Exists($confirmation_file)) {
|
||||||
echo "Confirmation file exists"
|
echo "Confirmation file exists"
|
||||||
@ -72,8 +73,18 @@ if ([System.IO.File]::Exists($confirmation_file)) {
|
|||||||
}
|
}
|
||||||
else
|
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'
|
$ErrorActionPreference= 'silentlycontinue'
|
||||||
|
|
||||||
|
$confirmation_file = "C:\program files\RustDesk\rdrunonce.txt"
|
||||||
|
|
||||||
net stop rustdesk > null
|
net stop rustdesk > null
|
||||||
$ProcessActive = Get-Process rustdesk -ErrorAction SilentlyContinue
|
$ProcessActive = Get-Process rustdesk -ErrorAction SilentlyContinue
|
||||||
if($ProcessActive -ne $null)
|
if($ProcessActive -ne $null)
|
||||||
@ -88,7 +99,7 @@ Write-Output $rustdesk_pw
|
|||||||
net start rustdesk > null
|
net start rustdesk > null
|
||||||
|
|
||||||
New-Item $confirmation_file > null
|
New-Item $confirmation_file > null
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## RustDesk URL Action
|
## RustDesk URL Action
|
||||||
|
Loading…
Reference in New Issue
Block a user