Print View

Windows cannot copy file \Application Data\VMware\hgfs.dat Profile Logoff Error

Issue

When a user logs off a Windows Server 2003 Terminal Server running as a guest on VMware with VMware Tools installed they get the following error:

Windows cannot copy file \Application Data\VMware\hgfs.dat to \<servername>\<username>\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.

This is caused by the VMware shared folders feature (hgfs) which is installed with a "Complete" VMware Tools installation, but not used under ESX.

Resolution

The most successful option has been to disable the Shared Folders option in the MSI.

Disable using the command line:

msiexec -i "VMware Tools.msi" ADDLOCAL=ALL REMOVE="Hgfs" /qn reboot=supress

Disable using a transform:

- Install Orca (http://theether.net/download/Microsoft/Utilities/Orca.Msi)
- Right click on the VMware Tools.msi and select Open with Orca
- Select Transform | New Transform
- Click on the Feature table in the left pane
- On the Hgfs feature set the level from 1 to 0
- Select Transform | Generate Transform
- Save the transform as "VMware Tools.mst"

Install VMware Tools with the following command:

msiexec /i "VMware Tools.msi" /qb TRANSFORMS="VMware Tools.mst"


Optionally remove the registry entry for hgfs as per VMware FAQ 1317:

1. Access the Windows Registry. Choose Start > Run, then type regedit. 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.
* For example, if the value data string contains LanmanWorkstation,hgfs then change it to LanmanWorkstation.
* If the value data string contains only hgfs, then 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.

References

Further information is available in VMware FAQ 1317:

http://kb.vmware.com/kb/1317

Products

VMware ESX 3
VMware ESX 2.5.X
Microsoft Windows Server 2003 SP1
Microsoft Windows Server 2003 RTM

Created: 14th July 2006
Updated: 13th November 2007

Print View

© 2005-2024 Jamie Morrison