0

I have a WPF App I am saving a configuration file in.

I am attempting to write to:

Environment.SpecialFolder.CommonApplicationData (C:\ProgramData\My App)

However, when I run the App (non Adminstrator) it writes the file here:

C:\Users\MyUser\AppData\Local\VirtualStore\ProgramData\My App

When I run the App as Administrator, it correctly writes to ProgramData.

This way I can share the settings file across users. Is there a special way the installer needs to be run or configured?

Is there another suggested way to share a configuration file without having to run the App as Administrator?

I am using Advanced Installer.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
aherrick
  • 19,799
  • 33
  • 112
  • 188
  • This is also nothing to do with windows installer or advanced installer. The install can't magically bless a limited user to run an app as if the user has elevated privileges. The app needs an elevation manifest for that. – PhilDW Mar 03 '18 at 18:51
  • When running the Installer on another machine with the same permissions it does create the directory. Not sure what is different/unique about my machine. Just an FYI I don't have the issue with a ClickOnce installer. – aherrick Mar 05 '18 at 02:00

0 Answers0