Inno setup makes sqlite3 database read-only

2019-06-11 11:41发布

问题:

I'm making an installation package which is to be used on windows and includes a sqlite3 database (which is not read-only).

When then package has been installed the sqlite3 database has become read-only for some reason. By the way, I'm using python 2.7.3 (with sqlite3 lib) to read/write from it.

My question is, is there away for me to unlock the sqlite database to become read/write through a python script, bat script, or the inno setup script perhaps?

Or is there a way for me to modify my inno setup script to keep the sqlite database from becoming read-only in the first place?

I've tried searching the forums and googling for an answer but haven't succeeded in finding one.

THanks in advance!

回答1:

On Windows, anything inside the Program Files folder is meant to be read-only during normal use. Data files should be installed elsewhere. See here for more advice on where to put them:

Does Microsoft have a best practices document regarding the storage of App Data vs User Data on different Windows Platforms?