File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 <TargetFramework >net9.0-windows10.0.22621.0</TargetFramework >
66 <TargetPlatformMinVersion >10.0.19041.0</TargetPlatformMinVersion >
77 <UseWindowsForms >true</UseWindowsForms >
8- <Version >11.1.0.19 </Version >
8+ <Version >11.1.0.20 </Version >
99 <AssemblyName >AutoDarkModeSvc</AssemblyName >
1010 <ApplicationIcon >..\adm_tray_new.ico</ApplicationIcon >
1111 <StartupObject >AutoDarkModeSvc.Program</StartupObject >
Original file line number Diff line number Diff line change @@ -4,6 +4,25 @@ fn main() {
44 if cfg ! ( target_os = "windows" ) {
55 let mut res = winres:: WindowsResource :: new ( ) ;
66 res. set_icon ( "adm_new.ico" ) ;
7+ // Embed an explicit asInvoker manifest. Without a requestedExecutionLevel,
8+ // Windows falls back to UAC Installer Detection, which heuristically flags
9+ // this binary as an installer (its name and version resources contain
10+ // "Updater"/"update") and prompts for elevation. PCA can also stamp a sticky
11+ // RUNASADMIN compat shim on a manifest-less exe. Declaring asInvoker disables
12+ // both: the updater simply runs with the token of whoever launched it.
13+ res. set_manifest (
14+ r#"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
15+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
16+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
17+ <security>
18+ <requestedPrivileges>
19+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
20+ </requestedPrivileges>
21+ </security>
22+ </trustInfo>
23+ </assembly>
24+ "# ,
25+ ) ;
726 res. compile ( ) . unwrap ( ) ;
827 static_vcruntime:: metabuild ( ) ;
928 }
You can’t perform that action at this time.
0 commit comments