[Mono-list] Howto manage Vista AppData\VirtualStore folder from a Mono app?
Xavi de Blas
xaviblas at gmail.com
Thu Nov 27 12:57:48 EST 2008
Hello again, i tried what you told me but found an sqlite path encoding problem.
Using:
Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Your App's Name")
it returns on an spanish XP:
C:\Documents and Settings\(user)\Configuración local\Datos de
programa\Chronojump
but this cannot be opened by sqlite because of the accented
"Configuración". Sqlite cannot open files that are in paths with
accents.
Any ideas?
thanks again
2008/11/27 Robert Jordan <robertj at gmx.net>:
> Xavi de Blas wrote:
>> Hello all
>>
>> My app on Windows is usally installed here:
>> C:\ProgramFiles\Chronojump
>>
>> and an sqlite file is here:
>> C:\ProgramFiles\Chronojump\database\chronojump.db
>> and logs are written here:
>> C:\ProgramFiles\Chronojump\logs\
>>
>> but on Windows Vista it doesn't allow the app to use this file
>> locations, and it uses user dirs like:
>>
>> C:\Users\(user)\AppData\VirtualStore\Program files
>>
>> Then there are two versions of the database and all i'ts a mess
>>
>> Is there any decent way to solve this?
>
> Yes: don't store writable data into "Program Files". This is a
> a requirement since Windows 2000 and since Unix 1970.
>
> Writable data for all users must be stored into
>
> Path.Combine(
> Environment.GetFolder(Environment.SpecialFolder.CommonApplicationData),
> "Your App's Name")
>
> Writable data for the current user:
>
> Path.Combine(
> Environment.GetFolder(Environment.SpecialFolder.LocalApplicationData),
> "Your App's Name")
>
> Writable data for the current roaming user:
>
> Path.Combine(
> Environment.GetFolder(Environment.SpecialFolder.ApplicationData),
> "Your App's Name")
>
>
> Robert
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list