Fix The Error – Virtual Windows XP Mode VHD Cannot Install Or Attach In Windows 7

In Windows 7 OS, when you go to install Windows XP Mode and Windows Virtual PC, installation process may stop and show the following error messages:

“The file could not be written.”
“Virtual hard disk could not be attached to the virtual machine. Please check the values provided and try again.”

This error massage is also displayed even when all the system requirements have been fulfilled by the computer hardware, including the requirements that are especially required for installing Windows Virtual PC such as hardware-assisted virtualization. There are more than one reasons associated with this problem when you try to install and run Windows 7 Virtual XP Mode.

One of the main reasons is Kaspersky Anti-virus and Kaspersky Internet Security and some other similar security crisis. These over zealously tends to prevent the computer from installation of third party or potentially malicious application. When it opts for the Kaspersky security application, the “Application Activity Analyzer” proactive feature is a most possible thing that prevents the system to run on Windows XP Mode and the virtual machine.

You have to stop the scanning and the detection activity for Hidden Objects in the Proactive Defense setting or Application Activity Analyzer (it depends upon the version of Kaspersky application). This is one of the effective ways while fixing the setup error of Windows XP Mode (XPM) in Windows 7. When you apply the above setting successfully, the Windows XP Mode would be installed properly.

As per the advanced standard procedure, you could disable the Kaspersky or any anti-virus application installed on your computer. After that, you could reinstall the Virtual Windows XP Mode and only then, you will be able to install Windows XP Mode faultlessly. Once completing the installation process, you could re-enable your anti-virus and security applications. These applications will not at all interfere in the working of Windows XP Mode.


  1. Kaspersky has nothing to do with this error! I don’t have Kaspersky on my computer but i got an error when trying to start Windows XP mode on my Windows 7 Ultimate computer. Why? I only attached the XP-vhd-file in Windows 7 disk manager. After that the virtual XP system wo’t start!
    Thanks alot Microsoft!!!


Please enter your comment!
Please enter your name here