fix: windows service mode

This commit is contained in:
GyDi
2022-11-22 22:01:34 +08:00
parent 40c041031e
commit 1550d528bd
4 changed files with 18 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ pub async fn install_service() -> Result<()> {
let level = token.privilege_level()?;
let status = match level {
PrivilegeLevel::NotPrivileged => RunasCommand::new(install_path).status()?,
PrivilegeLevel::NotPrivileged => RunasCommand::new(install_path).show(false).status()?,
_ => StdCommand::new(install_path)
.creation_flags(0x08000000)
.status()?,
@@ -74,7 +74,7 @@ pub async fn uninstall_service() -> Result<()> {
let level = token.privilege_level()?;
let status = match level {
PrivilegeLevel::NotPrivileged => RunasCommand::new(uninstall_path).status()?,
PrivilegeLevel::NotPrivileged => RunasCommand::new(uninstall_path).show(false).status()?,
_ => StdCommand::new(uninstall_path)
.creation_flags(0x08000000)
.status()?,