简体   繁体   English

在Window应用程序中制作exe文件后,拒绝访问xml文件以进行写入

[英]In Window Application After making exe file xml files are access denied to write

I have done one windows application, here i am storing some data in xml file. 我已经完成了一个Windows应用程序,在这里我将一些数据存储在xml文件中。

And also i want to update that xml file to update the details. 我也想更新该xml文件以更新详细信息。

All things are going fine in Project, When i make exe file build. 当我制作exe文件时,Project中的所有事情都进展顺利。 Installed in system, unable to write that file. 已安装在系统中,无法写入该文件。 I am not able to find that reason, in project i gave full access permission to that file. 我找不到该原因,在项目中,我授予了对该文件的完全访问权限。

Depending on where the XML file is located, you need to give it administrator privileges. 根据XML文件的位置,您需要为其赋予管理员权限。 You can do that by adding a manifest file to the project and modify the RequestExecutionLevel tag to RequireAdministrator . 您可以通过将清单文件添加到项目中,然后将RequestExecutionLevel标记修改为RequireAdministratorRequireAdministrator

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM