Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

UAC Virtualization and how it affects your Installers


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.

UAC Virtualization with Windows 7

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

HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\Software\National Instruments or HKEY_USERS\...


The following image illustrates the two components of UAC Virtualization: file virtualization and

registry virtualization.


http://i.msdn.microsoft.com/Bb756960.UAC_VirtualizationConceptual(en-us,MSDN.10).gif

               Figure 1. Taken from the Windows Developer Center



Symptoms of UAC Virtualization

Your applications might be experiencing the effects of UAC Virtualization if:

  •   Your application writes to Program Files, Windows directories, or the system root

               (typically the C drive) folders, but you can't find your files in these locations

  • Your application writes to the Windows registry, specifically to HKLM/Software, but you

                can't see the registry updates

  •   You switch to another user account, and your application is unable to find files that were

   written to Program Files, Windows directories, or the system root (typically the C drive) folders,

   or it finds older versions of these files.

After-thoughts

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.


Conclusion

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.

Christian A
National Instruments
Applications Engineer
0 Kudos
Message 1 of 3
(69,566 Views)
2 REPLIES

Re: UAC Virtualization and how it affects your Installers

widows xp is a really good operating system but windows 7 is a great inovation.

you can watch free online tv on windows 7 with Cinema Box HD TV

0 Kudos
Message 2 of 3
(5,623 Views)

Re: UAC Virtualization and how it affects your Installers

UAC virtualtization is something new which I am hearing with windows. It's a great post! thanks for the share.  I expect many more knowledgeable stuffs from you.

With best wishes,

minimilitia

0 Kudos
Message 3 of 3
(5,623 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.