{"record":{"id":"0a4e78bb924f0f8b","repo":"tonhowtf/omniget","slug":"reg-falhou","errorCode":null,"errorMessage":"reg falhou: {}","messagePattern":"reg falhou: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/win_tweaks.rs","lineNumber":556,"sourceCode":"                cmd.arg(\"/ve\");\n            } else {\n                cmd.args([\"/v\", name]);\n            }\n            cmd.args([\"/t\", \"REG_SZ\", \"/d\", s, \"/f\"]);\n        }\n    }\n    let out = cmd.output().await?;\n    if !out.status.success() {\n        let msg = String::from_utf8_lossy(&out.stderr).trim().to_string();\n        // apagar o que não existe não é erro\n        if matches!(value, RegValue::Delete)\n            && (msg.contains(\"unable to find\")\n                || msg.contains(\"não foi possível\")\n                || msg.is_empty())\n        {\n            return Ok(());\n        }\n        return Err(anyhow!(\"reg falhou: {}\", msg));\n    }\n    Ok(())\n}\n\n#[cfg(target_os = \"windows\")]\nasync fn is_admin() -> bool {\n    crate::core::process::command(\"net\")\n        .args([\"session\"])\n        .output()\n        .await\n        .map(|o| o.status.success())\n        .unwrap_or(false)\n}\n\n#[allow(unused_mut)]\npub async fn status() -> TweaksStatus {\n    let mut rules = rules();\n    #[cfg(target_os = \"windows\")]","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/win_tweaks.rs#L538-L574","documentation":"A reg.exe add/delete invoked by reg_set exited non-zero and the failure was not the tolerated 'delete of a missing value' case (the code ignores 'unable to find' / 'não foi possível' / empty stderr for Delete operations). The {} is reg.exe's trimmed stderr; typical causes are elevation requirements and invalid value data.","triggerScenarios":"Thrown at src-tauri/omniget-core/src/core/tools/win_tweaks.rs:556 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the reg.exe stderr in the message to identify the failing value or key","Run the app elevated when applying tweaks that touch HKLM","Verify the rule's registry path and data format (e.g. DWORD vs SZ)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}