需要以管理员的身份运行程序(winform)

1.添加应用程序清单文件(app.manifest)

2.打开app.manifest,将<requestedExecutionLevel level="asInvoker" uiAccess="false" />改为<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />,

3.ok拉。。

 

参考:https://blog.csdn.net/wm111/article/details/77990745

posted @ 2019-05-16 18:35  翻白眼的哈士奇  阅读(424)  评论(1编辑  收藏  举报