how to put user specific settings in an app.config file?
-
I want to be able to put an entry in my app.config so that, regardless of the user running the app, it will still point to their "My Documents" folder. The user's PCs are very locked down, and all they have access to is that folder, but obviously that folder is in a different location on every PC. Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user, wherever that is?
-
I want to be able to put an entry in my app.config so that, regardless of the user running the app, it will still point to their "My Documents" folder. The user's PCs are very locked down, and all they have access to is that folder, but obviously that folder is in a different location on every PC. Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user, wherever that is?
<blockquote class="FQ"><div class="FQA">orinoco77 wrote:</div>Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user</blockquote>
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
<blockquote class="FQ"><div class="FQA">orinoco77 wrote:</div>Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user</blockquote>
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hmm... not what I was actually after, but much better in fact. That will work nicely. Thank you.
It's the "proper" way. :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
It's the "proper" way. :)
Mark Salsbery Microsoft MVP - Visual C++ :java: