Search the VMware Knowledge Base (KB)
View by Article ID

Windows guest cannot update hgfs.dat or vmhgs.dat (1317)

  • 82 Ratings


When I log off from a terminal server in a virtual machine, why do I get these messages?

Windows cannot copy file C:\Documents and Settings\\Application Data\VMware\hgfs.dat to \\\\\\Windows\profile\Application Data\VMware\hgfs.dat
Windows cannot update your roaming profile. Reason: The process cannot access the file because the file is being used by another process.


If you use Terminal Services (TS) to connect to a virtual machine running a terminal server, and you have the roaming profiles feature enabled, TS caches your profile in the virtual machine for the duration of your TS session. When you log off at the end of the session, TS tries to rewrite your profile to the roaming profile server.

If you also have the VMware shared folders feature enabled in the virtual machine, TS tries to copy the file hgfs.dat back to the roaming profile server. This operation fails because VMware Tools keeps the file open with exclusive access; the file cannot be accessed by the Windows guest. This results in the error.

These messages are seen only by the first user to log on through TS; subsequent logons do not cause the user profiles to be cached, because the shared folders feature was not designed for concurrent session access.

You can safely ignore the failure to copy the roaming profile, but you may lose changes to your shared folder mappings that were made in the current session.

The shared folders feature is not supported by ESX Server or GSX Server, but is enabled when you install VMware Tools with the Complete option. The feature is not enabled when you install VMware Tools with the Typical option under these products.

You can work around the problem by changing a value in this registry key:


The workaround disables the VMware shared folders feature in the virtual machine. Since the feature is not supported by ESX Server or GSX Server, disabling it is not a problem. However, if you migrate the virtual machine to Workstation, you will not have access to VMware shared folders unless you re-enable the feature.

Caution: This procedure involves modifying the registry. Incorrect changes to the registry can leave your system unstable or unable to run. Always back up the registry before editing it and exercise caution in making changes to the registry. VMware takes no responsibility for problems that may arise. For more information on backing up and restoring the registry, see the Microsoft article 136393.

  1. Access the Windows Registry. Click Start > Run, type regedit, then click OK. The Registry Editor window opens.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\.
  3. Right-click ProviderOrder and choose Modify. In the Edit String Value dialog box, edit the value data string and remove the word hgfs, vmhgs, or vmhgfs).
    • If the value data string contains LanmanWorkstation,hgfs, LanmanWorkstation,vmhgs, or LanmanWorkstation,vmhgfs, change it to LanmanWorkstation.
    • If the value data string contains only hgfs or vmhgfs, erase it and leave the value data string empty.

  4. Click OK.
  5. Close the registry editor. Choose File > Exit.
  6. Reboot the virtual machine.
If you ever want to re-enable the VMware shared folders feature, add ,hgfs, ,vmhgs, or ,vmhgfs to the end of the value data string, or set the string to hgfs, vmhgs, or vmhgfs if it is empty. Alternatively, you can reinstall VMware Tools, using the Complete option to re-enable shared folders.

Additional Information

For translated versions of this article, see:


cannot-update-hgfs-dat  cannot-update-vmhgs-dat


1317; VMHGF; VMHGFS; kssfeedback

This Article Replaces


Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 82 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 82 Ratings