Thanks for your posting. You can use variables in the connection string and then set the variable value later at runtime. The relevant API method would be
SetVariable in this case. Here's an example:
// Define the variable "key" with the value "secret"
// And include the variable $key$ in the related connections
// string (the connections string can either be set directly
// or loaded from a file).
The idea would be to add a variable for the AppData folder and then set lookup and set the actual AppData path via
SetVariable. This has the advantage that you can use a generic and reusable connection string.
I hope this helps!