If you’ve encountered a script error while PXE booting images under the new Windows PE edition for Windows 11, you’re not alone. Yes, it’s frustrating! This issue often arises after upgrading the Windows Assessment and Deployment Kit (ADK) and its WinPE add-on for Windows 11.
Here’s what I did to fix the problem. Depending on how many WDS (Windows Deployment Services) or MDT (Microsoft Deployment Toolkit) servers you have, you may need to repeat this process on each one
To address the issue, follow these steps carefully:
Open a Command Prompt window with Administrator privileges:
Press Windows + S to open the search bar.
Type cmd, then right-click on Command Prompt and select Run as Administrator.
Enter the following command to modify the registry key:
reg.exe add “HKLM\Software\Microsoft\Internet Explorer\Main” /t REG_DWORD /v JscriptReplacement /d 0 /f
⚠️ Note: Modifying the Windows Registry can have unintended consequences if not done carefully. Ensure you back up the registry before making changes.
First, back up the file located at C:\Program Files\Microsoft Deployment Toolkit\Templates\Unattend_PE_x64.xml
by copying it to a secure location. This ensures you have a fallback in case something goes wrong. Once backed up, open the original file in a text editor with Administrator privileges, such as Notepad++ or Visual Studio Code, and make the necessary edits using the code provided. After saving your changes, regenerate the entire Windows Imaging Format (WIM) file to apply the updates. To do this, open the Microsoft Deployment Toolkit (MDT) console, right-click your deployment share, and select Update Deployment Share. This process will rebuild the WIM image with the updated configurations. If you manage multiple WDS/MDT servers, you will need to repeat these steps on each server to ensure consistency across your deployment environment.
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Description>Lite Touch PE</Description>
<Order>1</Order>
<Path>reg.exe add "HKLM\Software\Microsoft\Internet Explorer\Main" /t REG_DWORD /v JscriptReplacement /d 0 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Description>Lite Touch PE</Description>
<Order>2</Order>
<Path>wscript.exe X:\Deploy\Scripts\LiteTouch.wsf</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
</unattend>
Leave a Reply