1

I am creating a folder inside programdata folder using windows installer. Running the project i am getting an error while trying to write to the file

C:\ProgramData\MyAppFolder\settings_file.sqlite 

This is the error message

attempt to write a read-only database. 

How can i grant the write permission to the db file and some other files while building the msi file using windows installer

I can see the folder permissions as like this enter image description here

any way to make this read and write enables while building this via windows installer

0

1 Answer 1

0

ACL Permissioning: Adding write permissions for regular users is usually considered an anti-pattern, but sometimes you need to share a file among all users of the PC for pragmatic purposes.

Write Access: For the record: Here is a list of approaches to deal with permission denied issues. Most of the options listed are not good at all - and that is why the list was made - we need to remember why they are bad and what alternatives exist.

Deployment Tool: Application of custom ACL permissioning - to open a file in a protected disk location for writing by all users - is different depending on what tool you use to make your MSI. Since you don't specify WiX, Installshield, Advanced Installer or something else I am not sure how to answer. Let me use links instead:

WiX:

Installshield:

Advanced Installer:

  • Apply permissions by right clicking a folder and going to properties: Permission Dialog.
  • It seems this uses the old, legacy LockPermission table.

There are some other tools as described here: Short List. Secondary (more links).


Other Links:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.