Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(windows): hide console window when running setx command

louis030195cc6d30d93e47
diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rs
index 64dc1ab1b..c4978a555 100755
--- a/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -689,9 +689,13 @@ async fn main() {
// Set permanent OLLAMA_ORIGINS env var on Windows if not present
#[cfg(target_os = "windows")]
{
+ use std::os::windows::process::CommandExt;
+ const CREATE_NO_WINDOW: u32 = 0x08000000;
+
if env::var("OLLAMA_ORIGINS").is_err() {
let output = std::process::Command::new("setx")
.args(&["OLLAMA_ORIGINS", "*"])
+ .creation_flags(CREATE_NO_WINDOW)
.output()
.expect("failed to execute process");