<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18852">
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        MARGIN: 0mm 0mm 0pt; FONT-FAMILY: "Arial","sans-serif"; COLOR: blue; FONT-SIZE: 11pt
}
LI.MsoNormal {
        MARGIN: 0mm 0mm 0pt; FONT-FAMILY: "Arial","sans-serif"; COLOR: blue; FONT-SIZE: 11pt
}
DIV.MsoNormal {
        MARGIN: 0mm 0mm 0pt; FONT-FAMILY: "Arial","sans-serif"; COLOR: blue; FONT-SIZE: 11pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: "Arial","sans-serif"; COLOR: blue; FONT-WEIGHT: normal; mso-style-type: personal-compose
}
...MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-NZ link=blue bgColor=#ffffff vLink=purple>
<DIV><FONT color=#000000 size=2 face=Arial>I think you have struck a standard 
Vista/Windows 7 permissions issue:</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Programs are not supposed to write 
into the "Program Files" folder at all.&nbsp;&nbsp; If they try to, Vista (and 
Windows 7) will try to virtualise that write to another folder, as you have 
found.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Under Vista (and again presumably 
Windows 7) you are supposed to write into the "ProgramData" folder 
instead.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2 face=Arial>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.&nbsp;&nbsp;Its a blunt&nbsp;policy by Microsoft to prevent 
software altering installed programs folders.&nbsp;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.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2 face=Arial>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.&nbsp; 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</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2 face=Arial>(Or upgrade to D2009 or D2010 which 
take notice of these issues).</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV>John</DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=john@padasy.co.nz href="mailto:john@padasy.co.nz">PDS - John</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@delphi.org.nz 
  href="mailto:delphi@delphi.org.nz">DUG</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, December 05, 2009 7:07 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] Windows7 - AppData and my 
  dbase</DIV>
  <DIV><FONT color=#000000 size=2 face=Arial></FONT><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal>Hi all<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>I'm running D7 on W7 and goes well, however…<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>This (old) app uses a Paradox dbase which I stored at C:\ 
  Program Files (x86)\PDS\KCM\Tables, all works fine.<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>However, I discovered that:<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>- the IDE &nbsp;uses the dbase located at C:\ Program Files 
  (x86)\PDS\KCM\Tables<o:p></o:p></P>
  <P class=MsoNormal>- the EXE uses the dbase located at 
  C:\Users\John\AppData\Local\VirtualStore\Program Files 
  (x86)\PDS\KCM\Tables<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>Note 
  1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the 
  TDatabase is assigned to the IDE's location.<o:p></o:p></P>
  <P class=MsoNormal>Note 
  2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Making 
  changes to the dbase by means of running the EXE or the IDE alters only one or 
  the other dbase's tables.<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>Questions:<o:p></o:p></P>
  <P class=MsoNormal>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can 
  anybody explain this behaviour - that the IDE points to another location then 
  the EXE?<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  Originally I copied the dbase at the time ONLY to the IDE's location. How did 
  the dbase get to the Users\... location?<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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?<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.<o:p></o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal>Thanks for any help<o:p></o:p></P>
  <P class=MsoNormal>John<o:p></o:p></P></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>NZ Borland 
  Developers Group - Delphi mailing list<BR>Post: delphi@delphi.org.nz<BR>Admin: 
  http://delphi.org.nz/mailman/listinfo/delphi<BR>Unsubscribe: send an email to 
  delphi-request@delphi.org.nz with Subject: 
unsubscribe</BLOCKQUOTE></BODY></HTML>