AW: Problems deleting folders on Vista - error #?
J. Landman Gay
jacque at hyperactivesw.com
Sat Feb 14 16:29:26 CST 2009
Jim Bufalini wrote:
> Dear Jacqueline,
>> This is my main question because we have one customer who is having
>> unusual trouble. He uses Vista. The app was not able to create a folder
>> in his Documents folder. I don't know why, since it has been working
>> other customers, but I wondered if it was a permissions issue.
>> If an app is running as administrator, and the user always has rights
>> their own Documents folder, I thought the app could create folders
>> inside Documents without any trouble. But in this one case, it failed.
> Not sure. What I can tell you is that, under XP, the user's documents are
> located in:
> C:/Documents and Settings/<user name>/My Documents/
> And in Vista it's:
> C:/Users/<user name>/Documents/
> But if you use specialFolderPath(5) it compensates for this difference.
I generally use specialFolderPath("documents") which resolves to the
same paths. It helps me remember what I'm doing. :)
> I have an app that creates and deletes directories and files on XP and Vista
> under specialFolderPaths 26, 28 and 35 and it doesn't run as Administrator
> to do this and there is no need to change the UAC of the directories or your
> app. The safest place to put user's data is under specialFolderPath(35)
> which is the C:/Documents and Settings/All Users/Application Data/ in XP and
> C:/ProgramData/ folder in Vista and this never fails on either and doesn't
> require any changing of rights.
In my case, we want the folders to be created in the user's Documents
folder because they contain data files that the user may want to open
later. The app creates an enclosing folder and various sub-folders for
related content. In one or two cases, the enclosing folder failed to
create, though later sub-folders did get created (and in Documents, too,
which is odd because I wouldn't think the paths would resolve correctly.)
I can't repeat it and most users don't have a problem, but when Timeo
mentioned he couldn't always delete folders from Documents, it sounded
like a similar issue. But this may be something that has to remain a
mystery for now.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode