Yes it is UAC.  Windows UAC doesn't permit files being created or modified
in the Pro Files folder and several other folders, unless you specifically
give read/write permissions to the folders while in administrative
(elevated) mode.

It will be doing some virtualization and creating temporary folders/files.

For example, if an application attempts to write to "C:\Program
Files\myprogram\mysettings.ini" and the user doesn't have permission to
write to the Program Files folder, the write will be redirected to
"C:\Users\<username>\AppData\Local\VirtualStore\Program
Files\myprogram\mysettings.ini".

These folders will be deleted when Windows is restarted.
 
-----Original Message-----
From: Delphi [mailto:[email protected]] On Behalf Of Wilfried
Mestdagh
Sent: Friday, 5 September 2014 8:10 a.m.
To: 'Moderated List for the Discussion of Delphi Programming excluding
Database-related topics'
Subject: ExtractFilePath in Windows Vista

Hi,

When I write a program, then it create a few folders in the application
directory for initialization files and data files. I use therefore AppPath
:= ExtractFilePath(ParamStr(0)); And ForceDirectories(...) to create the
folders.

This has always worked, also on Windows Vista (32bit and 64bit) and later.
Now for the first time at a customar it did not worked. The directories and
files where created but I could not locate where it was (I assume somewhere
in the user directories).

To overcome this problem I copied my executable on another directory in the
C drive (not program files), then it worked.

I once had this problem also in a C# NTService. It was something with the
execution directory. I solved this, but this is Delphi 7...

Maybe ParamStr(0) does not (sometimes) point to the real directory? Someone
can advice here?

Note: This customer is the first customer I met where UAC was still on!
Something to do with that? (normally everyone has switched this stupid thing
off...)

thx

--
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be 

_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to