Add-in configuration settings

G

Graham

Hello,

I would like to add configuration for a managed Project Add-in and wondered
if there is a common location to store configuration data and also to
distribute configuration data at install time. Hopefully something
convenient and standard. I am guessing the HKCU registery so that is what I
am going to do -- if there is a better choice I would appreciate any tips!

Thanks,
Graham.
 
M

Mike Walker [MVP]

Hi Graham

There is no hard and fast rule but important to realise with excessive use
of the registry is not advised. Another option and preferred is to use a
configuration file and store this in a Specialfolder for User information,
this can be accessed in .NET by using the snippet below, another way of
finding this is resolving the environment variable "%USERPROFILE%\Local
Settings\Application Data" or "%USERPROFILE%\Application Data\"

..NET Code
System.Environment.SpecialFolder.ApplicationData

Hope this helps
Mike Walker MVP
Visual Developer VSTO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top