change stuff and add stuff

This commit is contained in:
2025-04-05 07:06:41 +01:00
parent 57db451958
commit c284bad06b
5 changed files with 51 additions and 14 deletions
+19
View File
@@ -0,0 +1,19 @@
use windows::{
Win32::UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_HIDE},
core::{HSTRING, PCWSTR},
};
pub fn elevate() {
let exe = std::env::current_exe().unwrap();
unsafe {
ShellExecuteW(
None,
&HSTRING::from("runas"),
&HSTRING::from(exe.as_path()),
PCWSTR::null(),
PCWSTR::null(),
SW_HIDE,
);
}
std::process::exit(0);
}
+1
View File
@@ -1 +1,2 @@
pub mod countdown;
pub mod elevate;