i m working on win. application , it using ms access as a database.
When i install it then .mdb file become readonly , now i can't update and save record.
How i can do that when i install it then it not become readonly?
When install win app. then .mdb file become readonly?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jean PaulRank #32 · 38.5K reputationPosted Oct 27, 2010, 12:36 AM EDT
I can say two solutions for the problem. (assume you are using visual studio setup and deployment project)
1) Choose the setup project, right click and select View File system menu item.
Select the access file and press F4 to see the properties window. Mark the property ReadOnly to false.
Try building the setup and execute it. If the problem persists please do the solution 2.
2) Right click on the setup project, and chose View>Custom Actions. Here you can specify the actions
you need to do after install. Right click on the "Commit" section in the appearing window and chose
"Add Custom Action". Select an exe file that is pre-existing which would make the file as writable.
(You need to create a separate console application, which on the startup will access the current directory and
make the file writable.)
Please make sure that the custom action file property "InstallerClass" is set to false.
Note
If the problem still persists please let me know (else mark as answer)
Vikas AhlawatRank #2,648 · 525 reputationPosted Oct 27, 2010, 1:15 AM EDT
irfan jahangir2 reputationPosted May 26, 2014, 6:14 AM EDT