Common file and registry virtualization issues in Windows Vista or in Windows 7

Article translations Article translations
Article ID: 927387 - View products that this article applies to.

Support for Windows Vista without any service packs installed ended on April 13, 2010. To continue receiving security updates for Windows, make sure you're running Windows Vista with Service Pack 2 (SP2). For more information, refer to this Microsoft web page: Support is ending for some versions of Windows

Expand all | Collapse all

On This Page

SYMPTOMS

When you use the virtualization feature of Windows Vista or of Windows 7, you may the experience file and registry virtualization issues that are described in the following scenarios.

Scenario 1: You receive error messages when you install, upgrade, or use an application

When you install, upgrade, or use an application, you may receive various error messages that indicate that access was denied. For example, you may experience one of the following symptoms:
  • After you install an application in a folder other than the %programfiles% folder, you receive "access denied" error messages. Additionally, the application does not function as expected.
  • You receive application error messages that resemble the following:
    Cannot create folder under C:\MyApp\Temp
    Cannot create file under C:\MyApp\Temp\output.dat
  • You receive error messages that resemble the following:
    Error Writing to MyFile.exe
    This issue may occur when you perform any of the following actions:
    • You create links in virtualized locations.
    • You use the Encrypting File System (EFS) to encrypt files.
    • You try to view compressed files.
    • You use the command prompt to copy an .exe, .sys, or .dll file into a virtualizable location.
  • Parts of the application that require file input or output no longer work correctly.

Scenario 2: You cannot find the file or the folder that you just created

When you use an application for which virtualization is enabled, you create data files in virtualizable locations of the file system. When you use another application or Windows Explorer to access these newly created files, you cannot find them. For example, if you save a file in a photo editing application in the %programfiles%, %systemroot%, %systemdrive%, or %programdata% folders, you cannot locate this file.

Scenario 3: You upgrade an application and then experience unexpected program behavior

After you upgrade an application, you receive an error message that resembles the following:
Error. Please upgrade your application
Additionally, the application does not work as expected. The application appears to be using incorrect or pre-upgrade data.

Scenario 4: After you uninstall an application, the application's files are still present on the computer

In this scenario, you experience one of the following symptoms:
  • In another application, you notice that file and folder information for the uninstalled application still exists in the %programfiles%, %programdata%, %systemdrive%, or %systemroot% folders.
  • The %userprofile%\AppData\Local\VirtualStore folder is larger than you expect. When you uninstalled the application, the virtualized files that were created during the application’s runtime were not removed.

CAUSE

These issues are caused by one or more of the following conditions:
  • The application tries to create files or folders outside certain specified virtualized folders.
  • Files that are saved by an application in the %programfiles% folder may be directed to a folder other than the user's virtual store folder.
  • The application uses a file that is not supported for virtualization.

RESOLUTION

Scenario 1

To determine whether you have the issue that is described in Scenario 1, look in Event Viewer for FileCreateVirtualExclude events. To do this, follow these steps:
  1. Click Start
    Collapse this imageExpand this image
    Start button
    , type eventvwr in the Start Search box, and then click eventvwr.exe in the Programs list.

    Collapse this imageExpand this image
    User Account Control permission
    If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
  2. Expand Applications and Services Logs, expand Microsoft, expand Windows, expand UacFileVirtualization, and then select Operational. If the event ID is 5000, a FileCreateVirtualExclude event has occurred.
To resolve this issue, use one of the following methods:
  • Reinstall the application in the %programfiles% folder if the program is not already installed in the %programfiles% folder.
  • Use an account that has administrative credentials to run this application. To do this, locate and then right-click the application shortcut, and then click Run as administrator.

    Collapse this imageExpand this image
    User Account Control permission
    If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
  • Run the application at an elevated command prompt. To do this, follow these steps:
    1. Click Start
      Collapse this imageExpand this image
      Start button
      , and then type cmd in the Start Search box, and then click cmd.exe in the Programs list.
    2. In the Programs list, right-click cmd, and then click Run as administrator.

      Collapse this imageExpand this image
      User Account Control permission
      If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
    3. Type MyAppsPath/MyApp, and then press ENTER. MyAppsPath/MyApp represents the path and the name of the application.
  • Change the security settings on the application's folder. To do this, follow these steps:
    1. Log on as a user who has administrative credentials, and then use Windows Explorer to open the application's folder.
    2. Right-click the application's folder, and then click Properties.
    3. On the Security tab, click Edit.

      Collapse this imageExpand this image
      User Account Control permission
      If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
    4. Under Group or user names, click your user account.
    5. Under Permissions for Users, click Allow for the following permissions:
      • Modify
      • Read & Execute
      • List Folder Contents
      • Read
      • Write
    6. Click OK.

Scenario 2

To resolve this issue, use one of the following methods:
  • Click the Compatibility Files button that appears on the Explorer bar to view virtualized files in the folder. The Compatibility Files button appears only if there are virtualized files in the folder.
  • Look in the C:\Users\User_name\AppData\Local\VirtualStore folder to locate files and folders.
  • Save your application's data in a folder under your user profile.

Scenario 3

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows


To resolve this issue, use one of the following methods:
  • Run the application at an elevated command prompt. To do this, follow these steps:
    1. Click Start
      Collapse this imageExpand this image
      Start button
      , type cmd in the Start Search box, and then click cmd.exe in the Programs list.

      Collapse this imageExpand this image
      User Account Control permission
      If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
    2. Type MyAppsPath/MyApp. MyAppsPath/MyApp represents the path and the name of the application, and then press ENTER
  • Open the virtual store, and then delete the old application data files. To do this, use Windows Explorer to open the C:\Users\User_name\AppData\Local\VirtualStore\Program Files\ MyApp folder, and then delete any files that are not your documents or data files.
  • Delete the virtual store from the registry.

    To locate the virtual store in the registry and to remove any unnecessary keys, follow these steps:
    1. Click Start
      Collapse this imageExpand this image
      Start button
      , type regedit in the Start Search box, and then click regedit.exe in the Programs list.

      Collapse this imageExpand this image
      User Account Control permission
      If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
    2. Locate and then click the following registry subkey:
      HKEY_CURRENT_USER\Software\Classes\VirtualStore
    3. For any application registry keys that are no longer needed, right-click the key, click Delete, and then click Yes.

Scenario 4

To resolve this issue, use Windows Explorer to open the C:\Users\User_name\AppData\Local\VirtualStore\MyApp folder, and then delete any obsolete application data.

MORE INFORMATION

File and registry virtualization helps users who have restricted access to the registry and to the file system write to these protected areas. Virtualization creates a "per user" copy and then redirects successive data operations. For example, assume that an application is running under a Limited User Account or under accounts that require User Account Control permissions. When this application writes to a system location, such as to the %programfiles% folder, Windows Vista and Windows 7 redirect write operations and read operations to a user-specific location in the user’s profile folder (%localappdata%\VirtualStore). By default, this location is C:\Users\User_name\AppData\Local\VirtualStore\Program Files\Application_name. Registry virtualization works similarly but applies to registry keys under the HKEY_LOCAL_MACHINE\SOFTWARE subtree. The keys and data under this subtree are redirected to the
HKEY_CURRENT_USER\Software\Classes\VirtualStore
subkey.

For more information, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/aa480150.aspx

REFERENCES

For help with common system maintenance tasks in Windows Vista, visit the following Microsoft Web page:
Fix problems with common system maintenance tasks

Properties

Article ID: 927387 - Last Review: October 29, 2009 - Revision: 4.2
APPLIES TO
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Premium
  • Windows Vista Home Basic
  • Windows Vista Ultimate
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
Keywords: 
kbfilesystems kbregistry kbexpertiseinter kbtshoot kbprb KB927387

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com