You can use this code to retrieve the location of the appdata folder as well as others.