允许访问权限设置在Windows的Program Files文件写7 [英] Allow access permission to write in Program Files of Windows 7

查看:513
本文介绍了允许访问权限设置在Windows的Program Files文件写7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序抛出安装目录所在的可执行文件驻留写入临时文件时拒绝访问错误。然而,它的工作原理非常清楚在XP。如何提供在Windows 7中的访问权限Program Files目录?

My application throws 'Access denied' errors when writing temporary files in the installation directory where the executable resides. However it works perfectly well in XP. How to provide access rights to Program Files directory in Windows 7?

编辑:
如何使程序要求用户提升权限? (即具有完全管理权限运行程序)

How to make the program ask the user to elevate rights? (ie run program with full admin rights)

推荐答案

您的程序不应该写临时文件(或任何其他为此事)到程序目录。任何程序应使用%TEMP%的临时文件和%APPDATA%用于用户特定应用程序数据。因为Windows 2000 / XP这一直是如此,所以你应该改变你的aplication。

Your program should not write temporary files (or anything else for that matter) to the program directory. Any program should use %TEMP% for temporary files and %APPDATA% for user specific application data. This has been true since Windows 2000/XP so you should change your aplication.

问题不在于Windows 7操作系统。

The problem is not Windows 7.

这篇关于允许访问权限设置在Windows的Program Files文件写7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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