Subject RE: [firebird-support] Embedded Firebird
Author Tomy Handaka
Thanks a lot all for your replies



I missed the Vista configuration :-)



________________________________

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Dean Harding
Sent: Tuesday, April 15, 2008 12:01 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Embedded Firebird



Tomy Handaka wrote:
> Yes, I am using Windows Vista. I noticed that it didn't happen on XP.
> Could you please explain more detail about it? Or there is website
that
> explain it technically?
>
> Physical FDB file:
>
> C:\Program Files\Terminal
>
> Virtual FDB File:
>
> C:\Users\<user>\AppData\Local\VirtualStore\Program Files\Terminal
>
> I wonder how Firebird/Vista create this file.

It's called "File System Virtualization" and is a feature of Windows
Vista that allows badly behaved applications (that assume they are
running with Administrator rights) to work even when not running as an
Administrator.

The way it works, basically, is that when you try to open a file under
"C:\Program Files" and request write access, if you do not have write
access to the file (i.e. you're not an Administrator) Windows will
create a "virtual" copy of the file under the VirtualStore directory in
your profile. It'll then grant you read/write access to the *virtual*
copy.

The correct solution is to not create any files under "C:\Program Files"

that will be written to by your application. If you need to share data
between users (and do you *really* need to do that?) then create it
under the directory returned from:

Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationDat
a);

Dean.





[Non-text portions of this message have been removed]