In earlier versions of Windows (XP, NT, 95 etc), administrators typically installed applications
for example installers. These applications could then freely read and write system files and
registry keys. However, running the same applications under the standard user account would
result in error dialogs. This article outlines how the User Account Control (UAC) feature in
Windows 7 addresses this problem.
Application compatibility for standard accounts is improved in Windows 7 by redirecting writes
(and subsequent file or registry operations) to a per-user location within the current user’s profile.
For instance, if a standard user runs an application that attempts to write to C:\Program Files\National Instruments\Settings.ini,
the write operation will be redirected to C:\User\Username\AppData\Local\VirtualStore\Program Files\National Instruments\Settings.ini
and likewise the path to registry keys HKEY_LOCAL_MACHINE\Software\National Instruments\ becomes
The following image illustrates the two components of UAC Virtualization: file virtualization and
Figure 1. Taken from the Windows Developer Center
Your applications might be experiencing the effects of UAC Virtualization if:
(typically the C drive) folders, but you can't find your files in these locations
can't see the registry updates
written to Program Files, Windows directories, or the system root (typically the C drive) folders,
or it finds older versions of these files.
UAC Virtualization is intended only to assist with compatibility for applications developed prior to
Windows Vista. New applications for Microsoft Windows 7 should not perform write operations to sensitive
system files and should not rely on UAC Virtualization to provide the necessary redirects.
1. When updating existing code to run on Windows 7, ensure that during run-time applications
store data only in per-user locations.
2. Determine the known folder to which you want to write the data files. Generic data used by all
users should be written to a global public location that is shared by all users. All other data should
be written to a per-user location.
3. Ensure that you do not hard-code paths once you have determined the appropriate locations.
Through UAC Virtualization, Windows 7 allows a standard user account to run applications that have been
developed under the assumption that administrator rights will be granted upon runtime.