mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-02 22:39:01 +08:00
增加编译后提权,增加适配性
This commit is contained in:
@@ -13,6 +13,13 @@
|
||||
<AssemblyVersion>1.2.1.2</AssemblyVersion>
|
||||
<FileVersion>1.2.1.2</FileVersion>
|
||||
<ApplicationIcon>Assets\arasaka-icon.ico</ApplicationIcon>
|
||||
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- 提权清单只在 Release(打包)构建生效:Debug 构建(含默认 dotnet run)不要求提权,
|
||||
便于开发调试;Release 产物仍通过 app.manifest 要求管理员权限启动。 -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
22
app.manifest
Normal file
22
app.manifest
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="Shigure.app"/>
|
||||
|
||||
<!-- 提权说明:主窗口需压过管理员权限运行的 WoW 进程,因此要求以管理员身份启动(UAC 确认)。
|
||||
指定 requestedExecutionLevel 节点将禁用文件和注册表虚拟化。 -->
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 和 Windows 11 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
</assembly>
|
||||
Reference in New Issue
Block a user