In my application,I am writing some values in application settings file. As i am working with prism I have some module and one shell project. After installing setup
在我的应用程序中,我在应用程序设置文件中写了一些值。当我使用棱镜时,我有一些模块和一个shell项目。安装完成后
Case: 1
When i have not set compatibility mode as "Run as Administrator". Running application i am able write application settings for all modules but unable to write for main shell project.
当我没有将兼容模式设置为“以管理员身份运行”时。运行应用程序我可以为所有模块编写应用程序设置但无法为主shell项目编写。
Case: 2
When i have set compatibility mode as "Run as Administrator". Now i am able write settings for all.
当我将兼容模式设置为“以管理员身份运行”时。现在我可以为所有人编写设置。
Required Solution:
I want to set my application compatibility mode as administrator forcefully but don't know how to do it?
我想强制设置我的应用程序兼容模式作为管理员,但不知道如何做到这一点?
1 个解决方案
#1
8
Add an app.manifest to your project. In there, under trustInfo --> security --> requestedPrivileges node, uncomment this line:
在项目中添加app.manifest。在那里,在trustInfo - > security - > requestedPrivileges节点下,取消注释这一行:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Then you're good to go.
然后你很高兴去。
#1
8
Add an app.manifest to your project. In there, under trustInfo --> security --> requestedPrivileges node, uncomment this line:
在项目中添加app.manifest。在那里,在trustInfo - > security - > requestedPrivileges节点下,取消注释这一行:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Then you're good to go.
然后你很高兴去。