views:

28

answers:

2

I have a program developed for Windows XP, but when I try to install it in Windows Vista, I get an error message saying that the SQL database (sqlite3) is read only. Is that due to a feature in Windows Vista?

A: 

It could be. A "regular" user has restricted access to the Program Files folder, and "naughty" programs that try to write their data there can give "access denied" and similar errors as a result.

You could try right clicking on the application and choosing "Run as Administrator" to see if this fixes the problem. (If it does, then look into whether it is possible to reconfigure it to store its data in a place it can write to without requiring admin rights)

Another possibility is that SQLite is not configured to allow your user account access - in which case you need to log into SQL as an administrator and grant your user account access rights.

Jason Williams
The program installed okay so I assume that I had administrator rights when I installed it. Would Vista make that distinction between installing and running even if you haven't changed your logon?
vfclists
No, from the OS perspective there should be no distinction between installing and running. Often installation must be done by an admin for exactly this reason, but provided data files are written somewhere else then a regular user can run the app fine.That said, what might be different is that the installer might be triggering elevation if the user is an admin, whereas your app and/or SQLite is unable to. Unfortunately I've not had to code for that scenario, so can't offer much advice other than searching for UAC/elevation if you think that may be the problem.
pdbartlett
Installers have special permissions on Vista, and SQLite wholly relies on the OS to do access control; there are no database-level permissions.
Donal Fellows
A: 

Normal Users in Vista only get the Read permissions to files in the Program Files directory

The msi installer in Vista runs as a user with higher permissions that allows it to write the files. You'll need to either Run the program as administrator or adjust the permissions of the files it needs to write to.

mikek3332002