How to Store Data Under %appdata% Using Visual Basic .NET

Sometimes we need to store some data or files under %appdata%. If you are using Windows 7 you can find this folder under C:\Users\Username\AppData.

AppData is a folder used to store information like cookies, Libraries, program settings, temporary files, templates, etc.

By using this folder you are certain that your settings are being protected by Windows.

To access this folder, all you have to do is use the following code:

Dim filePath As String filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\yourApp"

Comments

Add new comment