I think you have struck a standard Vista/Windows 7 permissions issue:

Programs are not supposed to write into the "Program Files" folder at all.   If 
they try to, Vista (and Windows 7) will try to virtualise that write to another 
folder, as you have found.

Under Vista (and again presumably Windows 7) you are supposed to write into the 
"ProgramData" folder instead.

Older software that does try to is likely to run into many problems - enough 
that from what I have read the best is just not to try it.  Its a blunt policy 
by Microsoft to prevent software altering installed programs folders. Possibly 
one of the solutions is to try to change the permissions of the Program Files 
folder but I suspect that folder gets special treatment by Windows so that is 
still not likely to work as you expect.

Probably best solution is to install Delphi instead to a different folder, and 
set the permissions to allow logged in users to write to that folder.  I do 
that with my programs under Vista, where some ini files are still stored in the 
program files folder, but that folder is not under \Program Files

(Or upgrade to D2009 or D2010 which take notice of these issues).

John

----- Original Message ----- 
  From: PDS - John 
  To: DUG 
  Sent: Saturday, December 05, 2009 7:07 PM
  Subject: [DUG] Windows7 - AppData and my dbase


  Hi all

   

  I'm running D7 on W7 and goes well, however.

   

  This (old) app uses a Paradox dbase which I stored at C:\ Program Files 
(x86)\PDS\KCM\Tables, all works fine.

   

  However, I discovered that:

   

  - the IDE  uses the dbase located at C:\ Program Files (x86)\PDS\KCM\Tables

  - the EXE uses the dbase located at 
C:\Users\John\AppData\Local\VirtualStore\Program Files (x86)\PDS\KCM\Tables

   

  Note 1:            the TDatabase is assigned to the IDE's location.

  Note 2:            Making changes to the dbase by means of running the EXE or 
the IDE alters only one or the other dbase's tables.

   

   

  Questions:

  1.         Can anybody explain this behaviour - that the IDE points to 
another location then the EXE?

   

  2.         Originally I copied the dbase at the time ONLY to the IDE's 
location. How did the dbase get to the Users\... location?

   

  3.         When I remove the tables from the IDE's location (by means of 
renaming the directory) and then run the EXE it can't find the tables, this 
while it uses the other dbase tables. How can that be?

   

  4.         Setting the TDatabase's settings to 
C:\Users\John\AppData\Local\VirtualStore\Program Files (x86)\PDS\KCM\Tables 
results in an error due to using a path to the tables being too long.

   

   

  Thanks for any help

  John



------------------------------------------------------------------------------


  _______________________________________________
  NZ Borland Developers Group - Delphi mailing list
  Post: delphi@delphi.org.nz
  Admin: http://delphi.org.nz/mailman/listinfo/delphi
  Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to