File permissions in the Program Files directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to modify a file in the Program Files directory (a properties
file for Visual C++ 2005 Express). It appears that the directory is read
only though. I am an administrator and I have UAC turned on. I also can't
modify files in my root directory (c:\). Why is this? I am an
administrator. I have tried running Windows Explorer as admin but the same
thing happens. It's a good thing I installed Vista as a dual boot with XP.
I think I will be going back to XP soon.
 
Hello,

In Windows Vista, even though you are an administrator, the programs that
run on your computer are not allowed to use your administrator power unless:

1- They prompt you for permission
2- You explicitly give them permission (right-click, run as administrator)

Additionally, Windows Explorer will not let you run it "as administrator" -
it should detect when it needs admin power and ask for your permission
accordingly.

The files in Program Files and your root C drive are not writiable by
non-administrative programs because the files in these areas affect every
user and the entire system.

Allowing unpriviliged programs write access to these areas would allow them
to overwrite/replace well-known programs or system-wide configuration data
used by windows or well-known programs, which is unacceptable for a program
that does not prompt.

There are a few solutions here:

1- (best) store your files in your user profile folder, or some other folder
you have created for your files, instead of in areas where system-wide files
are stored

2- Run the programs that need write access to that area "as administrator"

3- (worse) Change the security on the folder or files to explicitly give
your user account the desired permission - this will allow *any program that
runs on your computer* to have that permission to that area, so be careful
here, you could be opening your computer to attack.

--
- JB
Microsoft MVP - Windows Shell/User

Windows Vista Support Faq
http://www.jimmah.com/vista/
 
Thanks Jimmy. I gave my user write privileges to the Visual C++ directory
that contained the properties files and now I can modify the files. Since
this file is installed by Visual C++, I don't think I could move it.

I will move my files from the c:\ drive to my documents folder.
 
What about when I try to run office update and it wants to install something
to the program files directory, but the system isn't prompting me for admin
rights ability to do what it wants?

Jan Michael
 
Back
Top