From 10f250b7e780cb1e08a9d1558cb7517f5f6e54fa Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Wed, 8 Oct 2025 07:47:05 +0800 Subject: [PATCH] Revert "fix(windows): show UAC prompt for TUN service install/uninstall (#4959)" This reverts commit c05395c2585c9df6dbdc6a69758430f0be201ec1. --- src-tauri/src/core/service.rs | 4 ++-- src-tauri/src/core/win_uwp.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index fc51a1c3..3312f6c0 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -45,7 +45,7 @@ async fn uninstall_service() -> Result<()> { let token = Token::with_current_process()?; let level = token.privilege_level()?; let status = match level { - PrivilegeLevel::NotPrivileged => RunasCommand::new(uninstall_path).show(true).status()?, + PrivilegeLevel::NotPrivileged => RunasCommand::new(uninstall_path).show(false).status()?, _ => StdCommand::new(uninstall_path) .creation_flags(0x08000000) .status()?, @@ -80,7 +80,7 @@ async fn install_service() -> Result<()> { let token = Token::with_current_process()?; let level = token.privilege_level()?; let status = match level { - PrivilegeLevel::NotPrivileged => RunasCommand::new(install_path).show(true).status()?, + PrivilegeLevel::NotPrivileged => RunasCommand::new(install_path).show(false).status()?, _ => StdCommand::new(install_path) .creation_flags(0x08000000) .status()?, diff --git a/src-tauri/src/core/win_uwp.rs b/src-tauri/src/core/win_uwp.rs index 88c67aa3..3db9a1a4 100644 --- a/src-tauri/src/core/win_uwp.rs +++ b/src-tauri/src/core/win_uwp.rs @@ -18,7 +18,7 @@ pub fn invoke_uwptools() -> Result<()> { let level = token.privilege_level()?; match level { - PrivilegeLevel::NotPrivileged => RunasCommand::new(tool_path).show(true).status()?, + PrivilegeLevel::NotPrivileged => RunasCommand::new(tool_path).status()?, _ => StdCommand::new(tool_path).status()?, };