vs2019生成的安装包后安装的程序需要管理员权限运行怎么办?
Copyright Notice: This article is an original work licensed under the CC 4.0 BY-NC-ND license. If you wish to repost this article, please include the original source link and this copyright notice.
Source link: https://v2know.com/article/438
1. 在解决方案的属性里面- 安全性,找到启用ClickOnce安全设置
2. 勾选
3. 勾选后,你将发现项目里面多出了一个app.manifest文件,点进去
4. 找到代码段<requestedExecutionLevel level="asInvoker" uiAccess="false" />
将其改为:<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
5. 取消勾选
6. 重新编译
参考来源:
This article was last edited at 2020-08-23 19:31:54