Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am create msi installer for my winform project . my application is installed on the path C:\Program Files (x86)\Dashboard. But does not permission to write a file into this folder, how can i implement post script in msi installer to this solution?

What I have tried:

I create some custom action in my setup project.
Posted
Updated 17-Jun-16 5:21am
Comments
Nathan Minier 17-Jun-16 8:28am    
Are you making sure that the directory in question exists before you try copying files into it?

1 solution

The "Program Files" folder is protected by windows, and the guideline is that you are not supposed to write user data to that folder.

If you need to write data user the user accessible folders like :
C:\Users\name\AppData\Roaming
C:\Users\name\AppData\Local

With c#:
C#
Environment.SpecialFolder.ApplicationData
Environment.SpecialFolder.LocalApplicationData
Environment.SpecialFolder.MyDocuments
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900