Hello,
The problem you are experiencing is a result of "Virtualization."
In Windows Vista, programs that do not ask for permission ("Windows needs
your permission to continue") CAN NOT do administrative tasks.
Writing inside of the Program Files folder is an administrative task.
For compatability purposes, Windows Vista misleads applications that try to
write to commonly misued system locations (such as program files) into
thinking that they are writing to the folder; instead, Windows writes those
files under the user's profile directory.
If Windows did not do this, programs that make these common mistakes would
fail with "access denied," and you probably would not be able to use them at
all.
This is why you would be able to "see" these files in your .NET
application - your application is running in compatability mode, and so the
system lets it "see" compatability files.
Applications that are written for Windows Vista (they contain a vista
manifest), such as Windows Explorer, or are running with administrator
powers, do not see compatability files. If you run your .NET application
with administrative powers (right-click it and click Run As Administrator),
then you will notice that you can no longer see the compatability files.
The solution:
* Applications MUST NOT write to the program files folder. Program files is
only for storing static application files (such as .exe's), and programs
must have administrative powers (by asking the user for consent) in order to
write to this area. You will need to upgrade any application that does this
to the Vista-compatabile version.
* Do not save your files inside the program files folder. Save them inside
your user profile folder.
* Any program that has a valid need to write to program files folder (such
as an auto updater, for example) will have to be given administrative
powers. If the program does not ask for permission when it starts,
right-click the program and click Run As Administrator.
--
- JB
Microsoft MVP - Windows Shell/User
Windows Vista Support Faq
http://www.jimmah.com/vista/