In this post, we will see how to resolve Windows 10 Best Place for Sharing Data between Multiple User Accounts
Question:I’m converting a suite of legacy 32 bit C++ apps to run under Windows 10. These apps can run under different user accounts on the same PC and need to share the data between themselves and all the users. Some of the apps are Windows services, some are regular UI apps. There’s a lot of communication between the apps and sometimes this is accomplished using shared data files. All the different user accounts need to access the shared data…
I have tried storing the shared data in C:\Program Files (x86)\Common Files\AppName\data
and have set the security level on that folder to Full Control for All users.
Most of the time, this works perfectly well. But occasionally, at seemingly random intervals, one of the shared data files ends up in:
C:\Users\UserName\AppData\Local\VirtualStore\Program Files (x86)\Common Files\AppName\data
I have tried to replicate this, and it never happens when I’m looking…
If I run a simple UI app that just writes to this folder, everything is fine. The App does not need to run with elevated privileges to write to the folder.
I suspect it’s when one of the Apps is trying to write to a file that is locked by another, which the code handles by using exceptions, but Windows tries to help out by writing to the VirtualStore instead. But I could be wrong…
So, to cut to the question:
Where is the ‘best place’ to store shared data between several apps AND user accounts, that won’t end up in the VirtualStore?
Best Answer:Any application with a
requestedExecutionLevelnode in its manifest is marked as Vista compatible and the redirection to the Virtual Store is disabled.
If you have better answer, please add a comment about this, thank you!