Setup cannot copy the file cmnicfg.xml

Setup cannot copy the file cmnicfg.xml. Typically, a user will receive this error during a Windows installation. In the following simple solution, I'll cover how I fixed it.

Encountering Setup cannot copy the file cmnicfg.xml

The situation began shortly after a friend of mine decided to reinstall Windows. He used nLite to create an unattended Windows installation and proceeded to perform the install. Toward the beginning of the installation, he received the error "Setup cannot copy the file cmnicfg.xml". If he skipped the file and continued, he would get a copy error with the following files:

Setup cannot copy the file ipcfg.xml
Setup cannot copy the file osinfo.xml
Setup cannot copy the file potscfg.xml
Setup cannot copy the file pppcfg.xml
Setup cannot copy the file trustmon.dll
Setup cannot copy the file trustmon.mof
Setup cannot copy the file twcli32.msi
Setup cannot copy the file dwil1033.dll

After having skipped the files and then continuing to the setup
phase, immediately upon starting he would get the following errors:

Fatal Error: internal setup data structures are corrupted
SAM initialization failed because of the following
error. Directory service cannot start 0xC00002e1

At first, we thought maybe he had corrupted media or a bad burn. However, after looking into the situation further, it appears that the fully automated or unattended install settings were causing the errors.

As it turned out, the problem was that the Automated Windows installation was not prompting to format the partition, therefore, the installation was trying to access a directory that it did not have permission to access causing the file copy failures.

Fixing Setup cannot copy the file cmnicfg.xml errors:

You could use Windows installation media that is not setup for unattended installation

Or you can do this:

  1. Download the Gparted ISO and copy it to your bootable media.
  2. Restart your computer, booting from Gparted.
  3. Use Gparted to delete, create and format your partition
  4. Restart your computer from the Windows Installation disk and proceed to install Windows.

Other reasons for Setup file copying errors

As noted, the error message "Setup cannot copy the file" typically occurs during the installation of software or an operating system when a required file cannot be copied from the installation media to the destination location on your computer. This error message can indicate several possible issues and solutions:

    1. Corrupted Installation Media:
      Ensure that the installation media (CD/DVD or USB drive) you are using is not damaged or corrupted. If it is, try creating a new installation media with a fresh copy of the software or operating system.
    2. Bad Installation Media Drive:
      If you're using a physical installation disc, it's possible that the CD/DVD drive you're using to read the disc is faulty. Try using a different CD/DVD drive if available.
    3. File Corruption:
      The cmnicfg.xml file itself may be corrupted on the installation media. In this case, you might need to obtain a new copy of the software or operating system from a reliable source.
    4. Memory Issues:
      Memory (RAM) problems can sometimes cause file copy errors during installation. Ensure that your computer's RAM is functioning properly and try reseating the RAM modules if necessary.
    5. Hard Drive Issues:
      Issues with your computer's hard drive, such as bad sectors or file system errors, can also cause installation problems. Use a disk utility program to check and repair any potential hard drive issues.
    6. Clean the Installation Disk:
      If you're installing from a physical CD/DVD, clean the installation disk to remove any smudges, dirt, or fingerprints that may interfere with the data read process.
    7. Compatibility Issues:
      Ensure that the software or operating system you're trying to install is compatible with your hardware and operating system. Check for system requirements and compatibility information in the software's documentation or on the official website.
    8. Installation in Safe Mode:
      Try running the installation in Safe Mode, which can help eliminate potential conflicts with other software or drivers that might be causing the file copy error.
    9. Install from a Different Source:
      If you have access to another copy of the software or operating system (e.g., a digital download), try installing from that source to see if the issue persists.