Vista file permissions

  • Thread starter Thread starter irekzielinski
  • Start date Start date
I

irekzielinski

Hello to all Vista wizards :-)

I have an application that I want to make Vista "Standard User
Account" compatible.
My application used to store data in Program Files directory and users
were forced to run it in admin mode in Vista - so there are some files
in Program Files that are created and owned by administrator. I plan
to release new version that in installer will move all data from
Program Files to CSIDL_APPDATA. It works fine (I move files as my
installer has admin rights).

But then main application that works as standard user can not modify
those files - reason: those were created by user with administrator
token and can not be changed by my application with standard token.

How can I as a part of installation process move files to new location
and change the attributes so my none-privileged application can use
and change those?

Thanks for your time and help!
Kind regards,
Irek
 
Hello to all Vista wizards :-)

I have an application that I want to make Vista "Standard User
Account" compatible.
My application used to store data in Program Files directory and users
were forced to run it in admin mode in Vista - so there are some files
in Program Files that are created and owned by administrator. I plan
to release new version that in installer will move all data from
Program Files to CSIDL_APPDATA. It works fine (I move files as my
installer has admin rights).

But then main application that works as standard user can not modify
those files - reason: those were created by user with administrator
token and can not be changed by my application with standard token.

How can I as a part of installation process move files to new location
and change the attributes so my none-privileged application can use
and change those?

Thanks for your time and help!
Kind regards,
Irek


Your installer must change the ACLs so that everyone has modify permissions.
 
Can you give me some tips what API should I use?
Thanks!
Irek


I haven't programmed very much since Windows 95. You'd be better of asking
in the MSDN forums.
 
Thanks - your tip to look for ACL / ACE was helpful and I was able to
solve my problem by adding ACE with standart user details to affected
files :)
Thanks!
Irek
 
Back
Top