thoese
Posts: 2
Joined: Fri Aug 02, 2013 5:29 am

Permissions Help

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
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Permissions Help

Hi and welcome to Advanced Installer forums.

Sorry for the delayed reply.

I've tested your scenario, but I cannot reproduce the behavior. If the "Permanent" flag is set the file remains intact, it is not even backed up and restored during upgrade (it is not touched) and its permissions are not changed too.

Are you sure that you set the "Permanent" flag for the related component in the Organization page?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”