Unable to store user data in user settings in vsto for outlook 2013 RRS feed

  • Question

  • Hi there

    I've developed a simple plugin for outlook 2013 which takes an entry from the text box and saves it in the user settings

    Properties.Settings.Default.confId = cpIdtxt.Text.Trim();     


    and then I retrieve it after 


    It works on my development environment but when I package it and deploy it on the client's machine using advanced installer it doesn't work persistently what could be the reason? 


    Friday, July 13, 2018 1:57 PM

All replies

  • Hello Cornelius,

    The Program Files folder requires admin privileges for writing. And if you installed the add-in in any subfolder of the Program Files folder you have to get the required permissions for changing user settings there (stored in the config files). 

    In order to work with newer versions of Windows' policy of only allowing read access by default to the Program Files folder (unless you prompt for elevation with UAC, but that's another topic...), your application will have a settings folder under %userprofile%\appdata\local or %userprofile%\Local Settings\Application Data depending on which version of Windows you're running, for settings that are user specific. If you store settings for all users, then they'll be in the corresponding folder under C:\users or C:\Documents and Settings for all user profiles (ex: C:\users\public\appdata\local).

    So, consider choosing another target folder in the installer. 

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Sunday, July 15, 2018 8:33 PM
  • Hi Eugine, 

    I've found out that when the client when the client updates the windows/office suite this issue happens. While searching for the solution I came across a suggestion on settings upgrade but I don't know where to use it should I use on the add-in startup method?

    Thanks for taking the time to answer.  

    • Edited by Cornelius11 Thursday, July 19, 2018 11:15 AM
    Thursday, July 19, 2018 11:04 AM