0

I have created a windows application using SQLite database. The database file placed into the bin/Debug folder. I can successfully execute Read/Write commands using visual studio. But after installing the setup created using inno setup, I got error attempt to write a read-only database

How to solve this issue? any idea. this is from inno setup script

[Setup]
AppId={{7A32078B-4A69-4D03-ACD5-373283438A0C}
AppName=Test App
AppVersion=2.0.0
PrivilegesRequired=admin
DefaultDirName={pf}\test
DefaultGroupName=test
OutputDir=C:\Users\man\Desktop\2.0.0
OutputBaseFilename=test Setup
UninstallDisplayIcon={app}\test.exe
Compression=lzma
SolidCompression=yes

[Run]
Filename: "{app}\test.exe"; Description: "{cm:LaunchProgram,test}"; Flags: nowait postinstall skipifsilent
Abdul Manaf
  • 4,933
  • 8
  • 51
  • 95
  • An application usually has no write permission in its installation folder. You should deploy the database file somewhere else, e.g. to [Environment.SpecialFolder.ApplicationData](https://learn.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?redirectedfrom=MSDN&view=netframework-4.7.2). – Clemens Sep 11 '18 at 16:09
  • Ok, But how to copy my DB to app data folder. they contain some prebuild data – Abdul Manaf Sep 11 '18 at 16:11
  • You put it there with the installer. – Ken White Sep 11 '18 at 23:34

0 Answers0