Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Database (LocalDB .mdf & .ldf) read-only error

I have an InstallShield Limited Edition project which includes a SQL LocalDB that gets placed in the app_data folder within the program's installation directory. My understanding (and the initial installation behavior) was that the .mdf and .ldf files would be available for editing. Unfortunately this no longer is the case. My projects are under source control so the first thing I did was to leave these two database files checked out so that when building the projects the InstallShield project would not copy those db files with the read-only flag set on them. Even so, after the installation package is run on a system, the custom windows service starts and attempts to add or update records in the database but throws an error because it can't. The db files don't have the read-only flag set on them but the app_data folder permissions prevent the windows service from editing it. The work around currently is to manually adjust the permissions to this folder but we really shouldn't have to do this
0 Kudos
(1) Reply
Level 7 Flexeran
Level 7 Flexeran


Unfortunately, there is no control over the folder permission in LE.
Perhaps a custom action using Icacls to change the permission can work around the issue.
0 Kudos