Issues doing a sysprep (in hyper-v environment)

Anonymous
2024-10-24T20:18:51+00:00

Installed Windows 11 on a Hyper-V virtual machine (VM) and completed the entire installation process. (host machine is also win11)

1st Boot to Desktop:

I then rebooted the system to initiate the sysprep process; entered Audit mode, rebooted, and confirmed.

Once back on the desktop in Audit mode, I customized the system according to my specifications, including driver installation, debloating, applying updates, installing applications, activating, and configuring settings.

When the system configuration met my requirements, I entered the System Out-of-Box Experience (OOBE); performed a shutdown; and executed the "Generalize" option in sysprep.

Then, I mounted the VHDX file and utilized DISM to create an install.wim file. I then used PowerISO to convert the WIM file into an ESD format. I took the resulting install.esd file and placed it into the 'sources' folder of a clean Windows 11 ISO, removing the original install.wim file.

Now, when I run setup.exe from within a Windows environment (for testing purposes), I encounter an error indicating, "Setup has failed to initialize the working directory."

If I utilize the newly created ISO for a fresh installation in Hyper-V, I am prompted with the 'Select Language Settings' > 'Keyboard Settings' > 'Select Setup Option' > 'Product Key' (I do not have a product key), followed by a 'Getting a few things ready' message and an error: "Windows 11 setup, Setup has failed to validate the product key." Despite using a valid key, the message persists stating, "This product key didn't work.

The same thing happens wheather or not I use install.wim or install.esd during the process.

Am sure there is a better method than the one I used. Any links to tutorials or anything to help?

Any help would be greatly received. Thanks!

*** Moved from Windows / Windows 11 / Recovery and backup ***

Windows for business | Windows Client for IT Pros | Devices and deployment | Install Windows updates, features, or roles

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-10-29T03:18:23+00:00

    Hello  jnewcs,

    Thank you for posting in Microsoft Community forum.

    Setup Failed to Initialize the Working Directory

    This error can sometimes be caused by insufficient space on the C drive or corrupted temporary files. Here are a few steps to try:

    1. Check Disk Space:

     Ensure there is at least 20GB of free space on the C drive.

    1. Delete Temporary Files:

    Open the Run dialog (Win + R), type %TEMP%, and delete all files in the folder.

    1. Run SFC Scan:

    Open Command Prompt as an administrator and run sfc /scannow to check for and repair any corrupted system files.

    Setup Failed to Validate the Product Key

    This issue can be caused by various factors, including third-party antivirus software or missing configuration files. Here are some steps to try:

    1. Disable Antivirus Software:

    Temporarily disable any third-party antivirus software and try the installation again.

    1. Run Activation Troubleshooter:

    Go to Settings > System > Troubleshoot > Other troubleshooters, find the Activation troubleshooter, and run it.

    1. Check for Updates:

    Ensure your Windows 11 image has the latest updates installed.

    I hope the information above is helpful.

    If you have any question or concern, please feel free to let us know.

    Best Regards,

    Haijian Shan

    0 comments No comments

0 additional answers

Sort by: Most helpful