feat: persist RustDesk password via service profiles

This commit is contained in:
Esdras Renan 2025-11-12 11:58:24 -03:00
parent a535a6625b
commit b20db33d7b

View file

@ -641,9 +641,9 @@ exit $process.ExitCode
}
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 log_str = transcript.display().to_string().replace('\', "\\");
let log_str = transcript.display().to_string();
let script = format!(
r#"
$ErrorActionPreference='Stop'
@ -654,7 +654,7 @@ try {{
& takeown /F '{target}' /R /D Y
$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
if (($takeCode -eq 0) -and ($icaCode -in 0,1)) {{ exit 0 }}