Vista file permissions

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
 
K

Kerry Brown

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.
 
K

Kerry Brown

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.
 
I

irekzielinski

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top