MS Virtual Store Woes

I have a 4D built application that I deploy on Windows.

I’m struggling with MS Virtual Store: caching the last copy of my .4dc file.
I have code that’s supposed to launch a batch file upon quit, and delete the VirtualStore .4dc, but occasionally it fails.

Is there any way to tell 4D: Hey: Don’t write to my .4dc file AT ALL: so that MS windows will then not put a copy in Virtual Store?

For a long time, the recommendation has been “don’t install to the program files directory”.

The following tech tip mentions the virtual store as the main reason for this suggestion:
https://kb.4d.com/assetid=76405
{
Using Virtual Stores can get very messy. In the example above, the database isn’t even located where intended. What if the database was already installed to Program Files? This situation is potentially worse; a copy of the files will be made in the Virtual Store and all subsequent modifications will be made to the copy, not the original. If a user goes looking for the database files, they will need to check the virtual store for the latest version.

Because of the above challenges, we recommend not installing 4D databases and/or merged applications to protected folders. We recommend, in general:

  • If the application must be installed per-user, install it within the User’s folders (i.e. in the “My Documents” folder).
  • If the application can be installed per-machine, place it at the root of the drive (in its own folder of course).
    }

Tim,

Yes: I’m aware of the pitfalls of VirtualStore: and how your “actual” .4dc is a copy that’s running in a shadow folder.

My challenge is this: my application is installed on literally thousands of desktop machines: and many of the machines are logged into by multiple users: even regularly new users. My IT department has to deal with many of “their” IT departments.

“their” IT departments vary wildly: and many want our app as standard as possible (not installed in non-standard app locations)

My app gets installed with Advanced Installer, for all users.

My company can’t dictate to the end-user’s IT departments any unusual configurations of the machines.

So I need my app to be as “standard” as possible.