You can store data in the Program Files\app folder, although that is highly
discouraged since viruses can then write to your program executable file.
Better is Program Files\app\data. All it needs is a change of folder
permissions at installation time.
I contemplated changing my software to use the current users application
data folder, but my app is system wide and is not related to individual
users. My software is also often installed multiple times to different
folders with different data (purchased with different licences). This fact
made it difficult to install and decide which data folder is being used with
which program folder legally.
So my app now stores it's data in Program Files\app folder\Data. I use Inno
Setup which has the facility to set directory permissions. This is all you
need in the setup code.
[Dirs]
Name: "{app}\Data"; Permissions: users-modify
The Users group, which everyone belongs to, then has read, right and modify
permissions to the Data folder only.
You can set this manually in Windows Vista by right-clicking a folder,
select Properties, and go to the Security tab.
Cheers,
Ross.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Chris Stebbing
Sent: Wednesday, 25 July 2007 11:34
To: Borland's Delphi Discussion List
Subject: RE: Problems while creating/running apps for Vista
Hi All,
The issues with the program files folder makes me think that this is the
death of the program files location for small developers such as myself. I
find it useful and very convenient to store my programs and data in the one
location. My programs are small and my data is an integral part of the
program, therefore it makes sense to me to have them in the same location,
and makes it easier for my users (who know less about computers than most)
to keep track of their "stuff".
I can't help think Microsoft are less interested in protecting the end-user
than lining their own pockets. If Vista is capable of detecting an
old-style setup program and create the "virtual program files folder", then
surely it's capable of displaying the UAC or whatever it's called to ask for
confirmation that overwriting a program is ok. "You are about to replace a
program stored in the program files folder, is this ok?"
Cheers,
Chris.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi