Вопрос

I have an application that run on diffident OS version like(win XP,win 7,win 8). I have a .sdf data base with read-only access,i used Environment.SpecialFolder.Templates for temp path.

Temp Path= Environment.GetFolderPath(Environment.SpecialFolder.Templates)

It's work fine on win 7 ,but return error(permission denied) on win XP and win 8.

So i want to ask "What’s the recommended location for Application database in different Os version ?" Thanks in advance.

Это было полезно?

Решение

If the data is user specific

Environment.SpecialFolder.ApplicationData 

Else if the data is shared by all users of the application

Environment.SpecialFolder.CommonApplicationData
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top