添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.

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

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.

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 👍👍

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation. Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.