views:

579

answers:

1

This is a strange one to me. Let me list the setup:

  • Application with a manifest (ie: wont get pushed to virtual store)
  • UAC is turned on (can't write to other program files directories, or other areas, and uac prompt appears)
  • Can write to "c:\program files\%app_name%\%directory%\" both from within my application (not run as admin) as well as a non admin command prompt
  • Can not write to "c:\program files\%app_name%\%directory%\%subdirectory%\".

Any ideas? Are there hidden permissions or registry settings somewhere? Could it be that this directory was created when UAC was off, so now its fair game? Could it be that this directory was created in a time of XP, and its fair game?

It makes sense to me why i can't write to the other program files directories and the subdirectory. However I have no idea why i am actually allowed to write to the %directory%?

Side note: If I move the %directory% to another area (appdata), I still can not write to the subdirectory (confused).

Let me know any ideas you may have or anything I can check.

Thanks

+1  A: 

EDIT: Arr, sorry, I skimmed your post a little too fast, looks like this is a non-issue!

Have you looked where the written files are actually going?

Vista has a feature where files written into Program Files folders by applications get redirected to a local per user store. This store is located at %userprofile%\AppData\Local\VirtualStore

This is to allow legacy applications which wrote per user settings to Program Files to still operate correctly, also allowing multiple users to use the program without conflict.

There's a button in explorer called 'Compatibility Files' which will take you to this user store.. perhaps your writes are ending up there?

I'm not sure why you cant write to the subdirectory though. Security permissions?

Definitely not writing to the virtual store. Cause, even if the application's manifest wasn't working, im pretty sure cmd.exe doesnt throw things in there. Very strange, thanks for the input though.
Bob
It seems to be related to security permissions. Not sure how it got that way though...
Bob