Virtual store is a concept in Windows (Vista and newer) where unprivileged writes to system and program files/directories (as well as registry changes) are redirected transparently to a directory located inside the application data folder of each user (usually located at %localappdata%\VirtualStore).
Questions tagged [virtualstore]
31 questions
15
votes
3 answers
How to prevent file redirection to VirtualStore for read/write files?
I am using C# with .net 2.0
I am saving my program data in a file under: C:\ProgramData\MyProgramName\fileName.xml
After installing and running my application one time I uninstalled it (during uninstallation I'm removing all the files from "program…

Thomas
- 33,544
- 126
- 357
- 626
12
votes
3 answers
How to detect file redirection to the Windows VirtualStore?
Since the release of Win Vista, Microsoft introduced file virtualization for legacy applications running as 32bit processes. Released as part of Microsoft's User Account Control (UAC) any legacy applications attempting to write to any locations…

Simpleton
- 797
- 4
- 11
- 22
8
votes
2 answers
How to skip the VirtualStore and read files in Program Files folder?
I have a c# application on Windows 10 PC. There are settings files in the install folder (C:\Program Files (x86)\xxx) which I want to read, but not edit unless user has admin access. The problem is that windows is copying these settings files to the…

Sugrue
- 3,629
- 5
- 35
- 53
7
votes
1 answer
Writing to HKEY_LOCAL_MACHINE from .Net doesn't get virtualized in Vista or Windows 7?
I have trouble understanding the VirtualStore virtualization of registry operations in Vista and/or Windows 7. I thought trying to write something into the HKEY_LOCAL_MACHINE root while running as a standard user would prompt Windows to virtualize…

Mario
- 413
- 5
- 15
7
votes
3 answers
How to disable VirtualStore for C++ programs?
I'd like my program to throw an error when it tries to create files in protected locations like the root of the C:\ drive (eg: FILE* FileHandle = fopen("\\file.txt", a)). Instead the file gets created in the Virtual Store under %APPDATA%.
How can I…

Zain Rizvi
- 23,586
- 22
- 91
- 133
4
votes
3 answers
Get real path of a log file stored in VirtualStore
My application stores log files in a location which, depending on admin settings, can get redirected to a folder in the VirtualStore. They sometimes end up in, for example:
The log file is in:
C:\Users\-my…

Sugrue
- 3,629
- 5
- 35
- 53
2
votes
1 answer
Recovering files after disabling UAC virtualization
We're finally getting around to moving our software's documents out of the program's own directory and into "My Documents". We're also adding a "requestedPrivileges" line to the manifest to prevent further trouble with virtualization.
However if we…

doynax
- 4,285
- 3
- 23
- 19
2
votes
1 answer
Get the Virtual Store path?
I'm installing an application and want to set values for an ini file. Unfortunately, our main application is still built on a platform that gets redirected to the virtual store. Is there a way to get Inno Setup to store the ini file in the virtual…

Eric G
- 3,427
- 5
- 28
- 52
2
votes
4 answers
Reading from a database located in the Program Files folder using ODBC
We have an application that stores its database files in a subfolder of the Program Files directory. These files are redirected to the VirtualStore in Vista and Windows 7. We represent data from the database using Microsoft DataReports (VB6). So far…

Dabblernl
- 15,831
- 18
- 96
- 148
2
votes
1 answer
Write to windows directory(virtual store) with non admin user
I writing an interface for legacy application which reads data from windows directory.
So i need to write data into windows directory. (Windows 8 operating system)
I am using below code to get the windows folder path to write the file.…

Keshavdas M
- 674
- 2
- 7
- 25
2
votes
2 answers
How to stop files been saved in Virtual Store / ProgramData?
[ I submitted this question 2 months ago and didn't have any replies ... and obviously the problem is still live and we are about to release a new version of our app, so now am writing some documentation to get the users to delete any entries in the…

Tall Tyke
- 171
- 1
- 3
- 14
2
votes
0 answers
Visual Studio debug build application opens deleted file
I am having a weirdest situation with my .NET app right now. When I start the application inside the Visual Studio (debug build), it opens and loads an .xml file located at C:\ProgramData\MyApp\Settings.config.
The only problem is, this file…

Lou
- 4,244
- 3
- 33
- 72
1
vote
2 answers
C# - Vista - Decompression being virtualized when using CommonApplicationData
Assume UAC is ON. This does not create a problem with it off.
I have a c# app with a backup/restore functionality and using sql server 2005 express.
code to get the backupPath is used for both backup and restore and the name for all purposes will be…

TEEKAY
- 1,156
- 1
- 10
- 25
1
vote
3 answers
VirtualStore not working on Vista x64
I have a little tray application that wants to write to its own folder under the Program Files directory. I know this is not an ultimate design and I will fix it, but first I want to understand how this works.
Running this on a 32-bit Vista machine…

Niklas
- 56
- 6
1
vote
1 answer
How do you change file permissions to stop Vista from writing to a file in the VirtualStore directory?
When my program first installs it places a file in the user’s AppData directory, and the program then will periodically write to that file. The problem is in Vista the writes are not made to the file in the user’s AppData directory, they are made…

Yttrium
- 2,057
- 7
- 25
- 28