Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Doug Hennig
  Where is Doug Hennig?
 Regina
 Canada
 Doug Hennig
 To: Randy Bosma
  Where is Randy Bosma?
 
 Illinois - United States
 Randy Bosma
 Tags
Subject: RE: Where to put the Data on Vista?
Thread ID: 136889 Message ID: 137073 # Views: 87 # Ratings: 1
Version: Visual FoxPro 9 Category: Operating Systems
Date: Tuesday, July 03, 2007 3:10:49 PM         
   


Hi Randy.

> I've had one support call from a user who eventually revealed that they got a new computer and reinstalled my current VFP6 app on a Vista box. Strange errors - like the data was there, but the error message implied that it was inaccessible.

If your application tries to write to the program folder or one of its subdirectories, Vista by default "virtualizes" it, meaning it redirects the write (and all subsequent reads) to another folder, typically C:\Users\username\AppData\Local\VirtualStore\Program Files\MyFoxProApp. However, weird things can happen, like the DBF being virtualized but not the CDX if the app writes to an existing record but the index doesn't change.

> I've read recent discussions about VFP applications on Vista, and on blogs (most notably Rick Strahl and Doug Henning). My conclusion from those discussions is that I could put the program in
> C:\Program Files\MyFoxProApp,
> but the writing of data should go in a 'public' folder like
> C:\Documents and Settings\All Users\Application Data\MyFoxProAppData.

One other option: have your installer create a subdirectory of your program folder, eg. Data, and make that folder writable for all users. That way, the program folder is read-write, as it should be, but all the writable data for the app goes in a known writable location.

> Or maybe I install the .exe in
> C:\Documents and Settings\All Users\Application Data\MyFoxProApp,

Don't do that. First, the user should decide where the application goes, not you. Second, installing the application in a read-write folder opens a huge security hole on your user's system.

> - I don't have immediate access to a Vista system to see if MS did it the same way in Vista.

Get a copy of Vista; it's the only way you can properly test your app. You don't need a separate computer to install it on; download the free Virtual PC 2007 from MS and install it as a virtual PC on your existing XP box for testing purposes.

Doug



COMPLETE THREAD
Where to put the Data on Vista? Posted by Randy Bosma @ 7/2/2007 5:19:00 PM
RE: Where to put the Data on Vista? Posted by Cetin Basoz @ 7/2/2007 5:53:23 PM
RE: Where to put the Data on Vista? Posted by Randy Bosma @ 7/2/2007 10:19:00 PM
RE: Where to put the Data on Vista? Posted by Doug Hennig @ 7/3/2007 3:10:49 PM
RE: Where to put the Data on Vista? Posted by Randy Bosma @ 7/3/2007 6:35:28 PM
RE: Where to put the Data on Vista? Posted by Doug Hennig @ 7/5/2007 2:55:36 PM
RE: Where to put the Data on Vista? Posted by Frank Cazabon @ 8/7/2008 5:35:40 PM
RE: Where to put the Data on Vista? Posted by Bernard Bout @ 7/4/2007 6:35:21 PM
RE: Where to put the Data on Vista? Posted by Doug Hennig @ 7/5/2007 2:58:05 PM
RE: Where to put the Data on Vista? Posted by Bernard Bout @ 7/6/2007 5:35:04 AM
RE: Where to put the Data on Vista? Posted by Borislav Borissov @ 7/4/2007 6:48:56 PM
RE: Where to put the Data on Vista? Posted by Doug Hennig @ 7/5/2007 2:49:50 PM