Reputation: 57
How do I add write and modify permissions to a text file that will be installed in the Application Folder in the File System on Target Machine?
Upvotes: 0
Views: 848
Reputation: 20790
Your post seems to indicate that you are using Visual Studio setup projects, the Installer add-on.
Two basic points:
There is no support for doing this in Visual Studio setup projects, so you would need to write custom action code that alters those permissions. The code to do that is about security APIs, so you probably won't get an explicit answer here.
The most common reason people do this is that the application needs to update the file, and it fails because updating ProgramFiles folder content requires administrator privilege. If this is the case then your application design should be improved by having the file in (say) the User's Application Data folder, which has that name for the obvious reason that's the preferred location for such data.
Upvotes: 1