I'm trying to learn how to be better at storing my variables outside of the current application in which I'm working. I mostly work in building add-ins for applications such as Excel's VBA and DraftSight's AutoLisp, and most of my work doesn't require me to store anything outside of these applications. There have been a few insistence where I've needed to store settings outside of these two applications.
To help narrow the scope of what I'm asking, I'm wanting to learn about storing application and add-in variables in the Windows OS, for personal machines.
Questions
Store important per-user data in %appdata%
and unimportant data in %localappdata%
. The Shell.NameSpace
scripting method should let you access these in VBA.
You can see a list of all the special locations on MSDN. Simple settings can be stored in the registry instead.
You get to decide the file extension.
If you have proper access to the Windows API you can call CryptProtectData
to store encrypted data.