为什么Windows7在启动路径中未创建xml文件? [英] Why windows7 not created xml file in startup path?

查看:71
本文介绍了为什么Windows7在启动路径中未创建xml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用dev express 11.1.7.0在c#.net中创建了Windows应用程序,并创建了此应用程序的安装程序.在此应用程序中,当我单击按钮单击事件(保存按钮)时,我将创建一个新的xml文件.此xml文件保存在XML文件夹(E:\\ Test \\ bin \\ debug \\ XML \\ test1.xml)的应用程序的启动路径中.
我在XP和Windows7上安装了此设置.在XP上,它可以完美运行.但是在Windows 7上未创建xml文件.我没有任何错误.除XML文件外,所有记录均成功保存.

为什么Windows7在启动路径中未创建xml文件?

在此先感谢您

Hi,

I crated windows application in c#.net using dev express 11.1.7.0 & create i create a setup of this application. In this application i create a new xml file when i click on button click event (save button). This xml file is save in the start up path of application at XML folder (E:\\Test\\bin\\debug\\XML\\test1.xml).

I install this setup on XP & Windows7. On XP it works perfectly. But on Windows 7 xml file not created. I don''t get any error. Other than XML file all record save successfully.

Why windows7 not created xml file in startup path?

Thanks in advance

推荐答案

在启用了UAC的Windows 7上,您的程序无权写入"C:\ Program Files \"中的应用程序文件夹. />
除安装更新外,您的程序不应在应用程序文件夹中写入数据文件.而是将文件写入用户应用程序数据文件夹.
On windows 7 with UAC enabled your program does not have permission to write in the application folder in "C:\Program Files\".

Your program should not write data files in the application folder, except when installing updates. Instead write files to the user application data folder.


这篇关于为什么Windows7在启动路径中未创建xml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆