Article View: borland.public.cppbuilder.nativeapi
Article #375Re: Delete File
From: Remy Lebeau (TeamB)
Date: Fri, 18 Apr 2008 08:09
Date: Fri, 18 Apr 2008 08:09
45 lines
2597 bytes
2597 bytes
"bar" <shaikakbar250281@yahoo.co.in> wrote in message
news:48085050@newsgroups.borland.com...
> Onething i noticed a "Virtual Store\Program Files\App\" directory
> storing exact backup of directories that have been created in the
> "C:\Program Files\App\" directory.
That is Vista's "File System Virtualization" feature at work:
http://msdn2.microsoft.com/en-us/library/bb756960.aspx
Refer to the "Virtualization" section.
> My app when runs checks for the directory and create some directories in
> the "C:\Program Files\App\" if not exist. XP it was working fine.
You should not be creating folders and files under "Program Files" to begin
with. Create them in the CSIDL_APPDATA, CSIDL_LOCAL_APPDATA, or
CSIDL_COMMON_APPDATA folder instead, depending on your needs. Use
SHGetSpecialFolderLocation() or similar function to resolve those IDs to
physical paths.
> In vista if i delete the sub directories under "C:\Program Files\App\"
> manually. The program is considering the "Virtual Store\Program
> Files\App\" path as a app folder path and i don't have any control over
> the
> "C:\Program Files\App\" directory to create sub directories.
Because you are not supposed to be writing anything there to begin with, so
Vista is making sure you don't.
> But anyhow i changed the app subdirectories path for the below.
> XP -C:\Documents and Settings\All Users\Application Data\App\SubDirectory
> Vista - C:\Program Data\App\SubDirectory.
That is the CSIDL_COMMON_APPDATA folder.
> Is this recommended. I need my app sub directories for all users,
> instead of creating for each user.
Yes, CSIDL_COMMON_APPDATA is appropriate for that purpose.
Gambit
Technical Details
Message-ID:
<480859c5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<480642de@newsgroups.borland.com> <4806635f$1@newsgroups.borland.com> <48085050@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <480642de@newsgroups.borland.com> <4806635f$1@newsgroups.borland.com> <48085050@newsgroups.borland.com> Subject: Re: Delete File Date: Fri, 18 Apr 2008 01:09:12 -0700 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 76.89.173.41 Message-ID: <480859c5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208506821 76.89.173.41 (18 Apr 2008 01:20:21 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail