feat: persist RustDesk password via service profiles
This commit is contained in:
parent
a535a6625b
commit
b20db33d7b
1 changed files with 3 additions and 3 deletions
|
|
@ -641,9 +641,9 @@ exit $process.ExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fix_profile_acl(target: &Path) -> Result<(), String> {
|
fn fix_profile_acl(target: &Path) -> Result<(), String> {
|
||||||
let target_str = target.display().to_string().replace('\', "\\");
|
let target_str = target.display().to_string();
|
||||||
let transcript = env::temp_dir().join("raven_acl_ps.log");
|
let transcript = env::temp_dir().join("raven_acl_ps.log");
|
||||||
let log_str = transcript.display().to_string().replace('\', "\\");
|
let log_str = transcript.display().to_string();
|
||||||
let script = format!(
|
let script = format!(
|
||||||
r#"
|
r#"
|
||||||
$ErrorActionPreference='Stop'
|
$ErrorActionPreference='Stop'
|
||||||
|
|
@ -654,7 +654,7 @@ try {{
|
||||||
& takeown /F '{target}' /R /D Y
|
& takeown /F '{target}' /R /D Y
|
||||||
$takeCode = $LASTEXITCODE
|
$takeCode = $LASTEXITCODE
|
||||||
|
|
||||||
& icacls '{target}' /grant '*S-1-5-32-544:(OI)(CI)F' '*S-1-5-19:(OI)(CI)F' /T /C /Q
|
& icacls '{target}' /grant '*S-1-5-32-544:(OI)(CI)F' '*S-1-5-19:(OI)(CI)F' '*S-1-5-32-545:(OI)(CI)M' /T /C /Q
|
||||||
$icaCode = $LASTEXITCODE
|
$icaCode = $LASTEXITCODE
|
||||||
|
|
||||||
if (($takeCode -eq 0) -and ($icaCode -in 0,1)) {{ exit 0 }}
|
if (($takeCode -eq 0) -and ($icaCode -in 0,1)) {{ exit 0 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue