Windows Setup Configuration

Anonymous
2023-11-27T07:51:30+00:00

Hi all,

I have been working on creating a customised windows 11 setup media at work - to save time imaging and getting the computers on to InTune. To that end, I have already done several customisations but the one that eludes me is to trigger a batch file/cmd script to load when the OOBE Language selection screen loads up. When I set an asynchronous or synchronous command for OOBE in the autounattend.xml, it loads about 5-10secs before the OOBE screen comes up and thus prevents parts of the script from running correctly (Telling me commands are not recognised, etc when they work fine in OOBE). Does anyone know of a way I can do what I am trying to do?

Thanks in advance.

Kind regards,

Danny

Windows for home | Windows 11 | Install and upgrade

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.

0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-11-28T09:07:54+00:00

    Hi

    Welcome to Microsoft community.

    I understand that you are trying to run a batch file or cmd script during the Windows 11 setup process, specifically when the OOBE (Out-Of-Box Experience) Language selection screen comes up. However, it seems like your script is running slightly before the OOBE screen, causing some commands to not be recognized.

    This is a complex issue that might require more in-depth knowledge of your exact setup and script. However, you could consider the following:

    1. Delay the script: You could try adding a delay at the start of your script to ensure the OOBE has fully loaded before the script starts running. In a batch file, you can use the timeout /t <seconds> command to add a delay.
    2. Use SetupComplete.cmd: You could try using the SetupComplete.cmd method. This cmd file is meant to be run after OOBE completes, but perhaps it could work for your situation. The SetupComplete.cmd file should be located in %WINDIR%\Setup\Scripts\SetupComplete.cmd
    3. Use Windows Setup scripts: Windows Setup supports the configuration of scripts that can run at different points during the installation process. You might be able to leverage this feature to run your script at the correct time.
    4. Modify your autounattend.xml file: It might be possible to modify your autounattend.xml file to run the script at the correct time. However, this would require a good understanding of this file and the Windows Setup process.

    Please let me know if you need any further assistance. Thank you. 

    Best regards

    Derrick Qian | Microsoft Community Support Specialist

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-11-28T09:17:21+00:00

    My final solution was to add the scripts into the install image so that we can fire up command prompt using shift+F10 at first page of OOBE and typing the word "Intune" to run a custom script that calls the relevant commands. Works a treat. Also managed to incorporate a pre-usb boot setup script to clean disk 0 using diskpart before the "install location" screen appears. Also managed to reduce the input on 1st stage setup to 1 keypress - confirming where you want it installing 👍👍

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-11-29T01:54:52+00:00

    Hi

    Thanks for your reply.

    I'm glad your question has been resolved, and if you encounter any new questions in the future, feel free to open a new thread to ask questions.

    Thank you for your support of Microsoft products.

    1 person found this answer helpful.
    0 comments No comments