Skip to content

Commit 861daf5

Browse files
committed
fix: prevent the SHELL from appearing during notification
1 parent c66de80 commit 861daf5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

gui/backend/src/cmd/supports/notify.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ pub fn notify(app: &AppHandle, message: &str) -> Result<(), tauri_plugin_notific
1111
// See: [[bug] No notification sound on Windows](https://github.com/tauri-apps/tauri/issues/6652)
1212
#[cfg(windows)]
1313
{
14+
use std::os::windows::process::CommandExt as _;
1415
use std::process::Command;
16+
const CREATE_NO_WINDOW: u32 = 0x08000000;
17+
1518
crate::err_log!(Command::new("powershell.exe")
1619
.arg("[System.Media.SystemSounds]::Asterisk.Play()")
20+
.creation_flags(CREATE_NO_WINDOW)
1721
.output());
1822
}
1923
app.notification()

0 commit comments

Comments
 (0)