Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeing folders that do not exist
Message
From
22/06/2018 16:39:34
 
 
To
22/06/2018 12:54:22
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01660816
Message ID:
01660838
Views:
49
>>>>>are you trying to copy in c:\ ?
>>>>>it looks like there is privelege problem.try to run vfp9 as administrator and view folder/files in windows explorer.
>>>>
>>>>The invisible folders/files are in the VFP9 folder. I can create new files in the folder and see them there. But when I query the folder from Fox (DIR *.*) I see not only the file I created, but the ones I should be seeing from the File Explorer.
>>>>
>>>>While I have not found the source of the problem, but I have resolved it by restoring the folders and files from a backup. Only lost a days work. Oh well, its better then wrestling with it.
>>>>
>>>>Thanks for all the help.
>>>
>>>You mention the VFP9 folder -- do you mean a folder somewhere under special folders like "c:\program files (x86)\" ? You may be running into a potentially confusing feature of UAC Virtualization. Try looking in %LOCAL­APP­DATA%\Virtual­Store folder ( i.e. hidden folder c:\users\username\AppData\Local\VirtualStore ) to see if the folder and files in question could be found there.
>>>https://blogs.msdn.microsoft.com/oldnewthing/20150902-00/?p=91681
>>
>>Bingo.
>>There they all are. Now the question is "How do I stop it?" Is it safe to delete those files?
>
>The simple answer -- don't try to store any files in folders that are subject to virtualization (e.g. C:\Progoram Files and "C:\Program Files (x86) ). If you do need to store data somewhere, you can perform a few system calls to locate an appropriate location -- either something specific to user (which happens to occur automagically with the folder virtualization), or one that allows you to have data that is shared between different users. The other way is to completely sidestep this and NOT install the program in any of the protected folders.
>I believe there are ways to disable the directory virtualization, but could also mean that you'll be disabling any protection. There is also the risk that a future update downloaded through Windows Update may reset the configuration.
>
>The potetially confusing bit you could run into trying to store data in the Program Files directory hierarchy is that *each* user will have their own virtualized copy. If you execute the program as administrator (i.e. right-click on item, then select "Run as Administrator":), then any data files you store *will* be stored in the protected folder and not in a virtualized directory. Any user that doesn't already have their own virtualized copy of the file will read the one found in the Program Files folder -- until the user attempts to change it -- which then results in a copy local to the user will be stored and subsequently read.

Thanks for the clarification.

Perhaps I should illustrate my objective. I am building a new Task List Manager. As so, I am installing it under the VFP9 folder (like the original TaskList.app.) The associated files and tables need to be available locally.

My application (TaskListX.app) would be installed in the "C:\Program Files (x86)\Microsoft Visual FoxPro 9\" folder.

Now, after studying this virtualization, I conclude that I could place the user specific configuration file in the %APPDATA% roaming folder. If I understand the documentation correctly, the configuration file will be available on any machine on the network the user logs on to.

Second thing is the Task List support tables and files. These will need to be available to all user equally. Therefore I thought I would place these files in the %PUBLIC% folder. These files would rarely get modified and generally only by system administrators.

I have managed to implement this scenario, and appears to work as expect. (Testing on a single system make me wonder.) Should I be aware of any gotcha that might appear when it is installed on multiple machines?

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

Scratch that idea. After think more about I realized there could be a locking problem and simply maintaining the syncronization of the files. So I'm return to storing the tables on a network locations. But storing the users information in the APPDATA folder still may work.
Greg Reichert
Previous
Reply
Map
View

Click here to load this message in the networking platform