Hi,
Here is my situation:
I have an application that use a configuration file. The configuration file applies to all users of the system and all users can make change to the configuration.
I decided to put the configuration file in "All Users\Application Data" folder.
The problem is that the file is writable only by the user who created it.
Here is my temporary solution:
When creating the file, the application set its security options so that it can be written by all users of the system.
However, I think this is a hack and I think I have to create a service that will manage access to the file.
My application is written in C++ (MFC) and I'm not an expert with all the .Net stuff. So my first idea is to write a Windows C++ service with COM interfaces that will be called by the application.
My questions:
- Is my idea a good idea or someone knows a better way to do?
- Is there any new more up to date way to do a service in Windows than plain C++ and COM?
EDIT:
I know it's easy to set write permission to all users.
Back with Windows XP it was also easy to write files under "Program Files" and registry keys under "HKLM" with a limited user. But now, if you want an application to have the Vista logo certification, you must not write to these location (event if Virtual Stores can 'save' you).
Maybe my final solution will be the "make it writable to all users" one, but my question really is : "Is my solution good or do you have another easier solution that does not rely hacking a behavior fixed by Microsoft".
I'm really sorry to not have made it clear from the beginning.
Thanks a lot,
Nic