I built an installer and set permissions on a data folder and a few configuration files. On some of the files I need write permissions. One in particular is a file named db.config which stores a connection string to a database. I gave the file modify permissions to the Everyone group.
Everything works fine on the initial install. I have the permanent attribute set on the component which contains the db.config file so that if the software is upgraded (an uninstall and reinstall is done) this file will remain so the user doesn't have to reconfigure the database connection. I relilaize that when the program uninstalls it reverts the permissions granted. However when the program reinstalls since it doesn't overwrite this file the permissions on it is not set (is this normal?) and it's therefore read-only.
Is there a way to set these permissions so they won't roll back? Could you please give me some advise as to the proper method of doing this? I've used calcs in a custom action previously but this doesn't always give me the desired results either. I'm was passing in the [AppDir] to the custom action so I could set permissions on the folder the user selected during the install. I'll use calcs, icalcs, xcalcs, build an exe, or use the built-in installer permissions (whatever works!).
Please advise as to what I should be doing to make the above scenario work properly.
Thank you
FOLLOW US
Get the latest news in Application Packaging