mirror of
https://github.com/techahold/rustdeskinstall.git
synced 2025-08-02 17:09:29 +02:00
remove unnecessary cd to temp
This commit is contained in:
parent
4e0f30dbc4
commit
da203008e9
@ -25,8 +25,6 @@ If (!(Test-Path $env:Temp)) {
|
||||
New-Item -ItemType Directory -Force -Path $env:Temp > null
|
||||
}
|
||||
|
||||
cd $env:Temp
|
||||
|
||||
If (!(Test-Path "$env:ProgramFiles\Rustdesk\RustDesk.exe")) {
|
||||
|
||||
cd $env:Temp
|
||||
@ -109,18 +107,14 @@ If (!("$env:WinDir\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\
|
||||
$rustdesk_pw = (Get-Content $env:AppData\RustDesk\config\RustDesk.toml | Where-Object { $_.Contains("password") })
|
||||
$rustdesk_pw = $rustdesk_pw.Split("'")[1]
|
||||
Write-Output("Config file found in user folder")
|
||||
|
||||
OutputIDandPW $rustdesk_id $rustdesk_pw
|
||||
|
||||
} Else {
|
||||
$rustdesk_id = (Get-Content $env:WinDir\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk.toml | Where-Object { $_.Contains("id") })
|
||||
$rustdesk_id = $rustdesk_id.Split("'")[1]
|
||||
$rustdesk_pw = (Get-Content $env:WinDir\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk.toml | Where-Object { $_.Contains("password") })
|
||||
$rustdesk_pw = $rustdesk_pw.Split("'")[1]
|
||||
Write-Output "Config file found in windows service folder"
|
||||
|
||||
OutputIDandPW $rustdesk_id $rustdesk_pw
|
||||
|
||||
}
|
||||
|
||||
Start-Sleep -s 10
|
||||
|
Loading…
x
Reference in New Issue
Block a user