I have created a program in C# with Visual Studio 2008.
I can package it as a .msi file, which installs just fine. However, when installed, for instance, in the Program Files (x86) folder, which is the default, it can't write to the .xml file that's included (using .xml for settings and small storage). It only works when running as Administrator.
My question is, how do you build your Setup and Deployment so that it gets Admin rights automatically instead of needing user compatibility setup?
Its not recommended by microsoft to place any user files in the programFiles directory, it doesn't belong there.
Instead write those files in the ProgramData folder.
EDIT: A fast search found a duplicate question and answer here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With