当前位置:首页 > 开发 > C# > 正文内容

C# Windows环境下以管理员启动

C#2年前 (2023-10-02)

右键点击项目名称    -    [添加]    -    [新建项]    -    [应用程序清单文件 (仅限 Windows)]    -    [添加]

在app.manifest中找到

        <requestedExecutionLevel level="asInvoker" uiAccess="false" />

将level的值改为        requireAdministrator    

        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />


转载请注明出处。

本文链接:http://pythonopen.com/?id=297

相关文章

C# 请确保您的 Main 函数带有 STAThreadAttribute 标记。”

System.Threading.ThreadStateException:“在可以调用 OLE 之...

C# System.IO.Path

System.IO.Path.GetExtension返回指定的路径字符串的扩展名。string&n...

C# BackgroundWorker,在DoWork里更新控件内容

一般情况下不可以直接在BackgroundWorker的DoWork事件中更新 UI 控件在Back...

C# Byte[]转为Bitmap

在 C# 中,可以使用System.Drawing命名空间下的相关类将byte[]类型的数据转换为B...

C# Graphics图像抗锯齿

g.SmoothingMode = SmoothingMode.AntiAlia...

C# 控件判断鼠标位置

        //...