This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Database (LocalDB .mdf & .ldf) read-only error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Nov 09, 2016
10:59 PM
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
(1) Reply
Nov 10, 2016
10:13 AM
Hi,
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.
https://technet.microsoft.com/en-us/library/cc753525(v=ws.11).aspx
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.
https://technet.microsoft.com/en-us/library/cc753525(v=ws.11).aspx