replace cmd.exe with rustdek.exe when check uac
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
b14f457474
commit
41893e2ac2
@ -1478,7 +1478,13 @@ pub fn run_uac(exe: &str, arg: &str) -> ResultType<bool> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn check_super_user_permission() -> ResultType<bool> {
|
pub fn check_super_user_permission() -> ResultType<bool> {
|
||||||
run_uac("cmd", "/c /q")
|
run_uac(
|
||||||
|
std::env::current_exe()?
|
||||||
|
.to_string_lossy()
|
||||||
|
.to_string()
|
||||||
|
.as_str(),
|
||||||
|
"--version",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn elevate(arg: &str) -> ResultType<bool> {
|
pub fn elevate(arg: &str) -> ResultType<bool> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user