Fixing VBScript Support in Windows ADK SEP 2023 Update (Build 25398)

For those that tried out the latest Windows ADK for Windows 11 22H2, you quickly learned that Microsoft overlooked testing a bit. The VBScript component had been removed, breaking deployment solutions like MDT, or ConfigMgr (when using VBScripts). This post covers a temporary workaround until Microsoft releases an official fix.

Update November 20, 2023: This issue is now fixed using the latest LCU KB5031373 or newer for Server Operating Systems. More details here: https://learn.microsoft.com/en-us/windows-hardware/get-started/what-s-new-in-kits-and-tools?source=recommendations#windows-pe-known-issues

Update December 9, 2023: Created some useful PowerShell scripts:

Useful PowerShell scripts

Apply the official fix to an existing MDT Lite Touch boot image:
https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/Update-ADK25398BootImageWithCU.ps1

Apply the official fix to the default ADK boot image:
https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/MDTVBScript/Update-ADK25398BootImageInstallFolderWithCU.ps1

———- I kept the old workaround (below) as a reference, thank you everyone that helped ——-

Old Article and Background Information

Credits: Big thanks to Avi Kroparo for pointing me to using FODs from Azure Stack HCI media (build 25398), sending me on the right path!

This workaround also takes care of the error message if upgrading an MDT solution to the latest build, or when using the MDT Integration with ConfigMgr (or any other VBScripts). See the specific MDT and ConfigMgr instructions further down this post:

Error: The value for the attribute is not valid : language

Why Upgrading Then?

The main reason for using the new ADK was that it included the hotfix for the Secure Boot security issue covered in CVE-2023-24932, and that would eliminate the somewhat painful process of patching the older WinPE media (Build 22621) due to its relation to optional components added later and having to apply the latest cumulative update (LCU) afterwards.

Inside Windows ADK SEP 2023 Update

A fun fact about the latest Windows ADK for Windows 11 22H2 is that it's actually built from Windows 11 23H2 Media, build 25398, with has the codename Zinc. Anyway, in Windows 11 23H2, VBScript is FOD (Feature-On-Demand), and that can be downloaded and added to the new WinPE version. If you are curious, you can list available FODs by running the following command on any Windows 10 or Windows 11 OS:

DISM /online /get-capabilities

Download the VBScript FOD for WinPE 25398

To download a working VBScript component for WinPE 25398, you can install the latest Insider Preview (currently build 25951) on a VM, and copy the FODs from that one. However, to get them from the OS you have to be quick.

Note: As mentioned earlier, you can also get the VBScript FODs from Windows Server, version 23H2 (Build 25398).

First, on your Windows 11 Insider VM, remove the existing VBScript FOD by running this command:

DISM /online /remove-capability /capabilityname:VBSCRIPT~~~~

Then, add it back again by running this command:

DISM /online /add-capability /capabilityname:VBSCRIPT~~~~

Finally when the FOD install is about 60-70%, head over to the C:\Windows\SoftwareDistribution\Download folder, and copy what's created there to a temporary folder. Please note that you have to be quick, because the files are deleted after the install is completed.

Note: To avoid stress, you can temporarily apply a "Deny Delete" ACL for SYSTEM on the C:\Windows\SoftwareDistribution\Download folder. Thank you Steven Yarnot (@YarnoSG) for the tip!

Fixing MDT 8456

In addition to making the usual new-ADK-fix, by making a copy of the amd64 folder and named it x86 in C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment. You need to copy the newly downloaded FODs.

  • Microsoft-Windows-VBSCRIPT-FoD-Package~31bf3856ad364e35~amd64~~.cab
  • Microsoft-Windows-VBSCRIPT-FoD-Package~31bf3856ad364e35~amd64~en-us~.cab
  • Microsoft-Windows-VBSCRIPT-FoD-Package~31bf3856ad364e35~wow64~~.cab
  • Microsoft-Windows-VBSCRIPT-FoD-Package~31bf3856ad364e35~wow64~en-us~.cab

Copy the non-en-us named files to C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs.

Copy the en-us named files to C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us.

Finally, in the deployment share properties, select the added optional components, and then update your deployment share.

Add the VBScript FOD to a ConfigMgr Boot image

Here is a PowerShell script you can use that adds the VBScript FOD to a ConfigMgr Boot image

https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/Add-VBScriptForWinPE25398ToConfigMgrBootImage.ps1

Add the VBScript FOD to any WinPE 25398

FODs can be added to WinPE boot image like any other package via dism.exe, the syntax is:

dism.exe /Image:<mount folder> /Add-Package /PackagePath:<path to package.cab>

If you prefer a ready-made PowerShell script, I made one for you here: https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/New-WinPE23H2WithPowerShellAndVBScript.ps1

Beyond the Blog Post – Let's Meet

If you liked this post, I would love to get your feedback. Comments are open, and I have no plans to ever close them 🙂 Also, if you want to learn more, I'm presenting deployment training regularly on the ViaMonstra Online Academy, check it out: https://academy.viamonstra.com

About the author

Johan Arwidmark

5 14 votes
Article Rating
Subscribe
Notify of
guest
52 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Harry
Harry
30 days ago

Thanks a lot for the provided fix Johan! Working for me aswell now. I have another Question in addition which maybe doesn't fit that topic, but still i can't find any solution about it anywhere and maybe you know something about it? We're deploying with MDT latest version with Bugfix implemented and the latest ADK Version for Win11. After the image gets installed and the device is rebooting and should continue installing applications etc on desktop, it gets stuck at Windows Login Screen, which appears on every first login saying "Hi we are setting up a few things" and so… Read more »

Last edited 30 days ago by Harry
Harry
Harry
25 days ago

The OSDCloud Driver injection also happens in the WinPE Phase, which shouldn't be the problem imo. We are deploying Win11 22H2 on Dell XPS/Latitude Devices. I'm not 100% sure but it seems to be an issue with the format disk step, because when i try to restage an already imaged device, the error occurs, only when i clean the disk with diskpart before the Deployment Wizard appears on the beginning and restart the device, the deployment works without any issues. I just try to find a way to automate that clean disk step on the beginning, which i tryd to… Read more »

Last edited 25 days ago by Harry
Kelly Smith
Kelly Smith
1 month ago

Johan Hello, I updated to latest ADK, I ran into an issue when I wanted to edit unattend.xml through GUI in MDT. MDT isnt seeing the ADK version. Will keep saying I need to update to latest. Error Performing the operation "generate" on target "Catalog". Starting: "C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.Catalog40.exe" "P:\PROD\Operating Systems\Win11-23H2-031524\WIN11.wim" 1 > "C:\Users\PKSA07~1\AppData\Local\Temp\Microsoft.BDD.Catalog.log" 2>&1 Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.   at Microsoft.BDD.Catalog.Program.DoCatalog()   at Microsoft.BDD.Catalog.Program.Main(String[] args) Non-zero return code from catalog utility, rc = -532462766 WSIM Error: Below I have… Read more »

Kelly Smith
Kelly Smith
25 days ago

Thank you Sir!!

Kelly
Kelly
25 days ago
Reply to  Kelly Smith

I copied the files over now my image stops after reboot into state restore and there’s no log info. The machine gets added to the domain but has the capture name not the name it was given. Was using wism to configure unattend for the copy profile setting to set default profile. Ugh- every once in great while things seem to go very sideways.

Andy
Andy
1 month ago

I'm running MDT 8456 on Windows Server 2016 with the latest ADK and WinPE. I'm guessing there's no way to fix this combination unless I upgrade to Server 23H2?

Andy
Andy
1 month ago

Thanks Johan. As I couldn't apply the 23H2 patch to WS2019, I ended up patching WinPE with the 4 extracted FOD packages. That way I don't need to patch the boot image every time MDT regenerates it.

Andy
Andy
1 month ago

Hi Johan, I didn't patch the OS. I patched the ADK/WinPE location on the server. MDT now regenerates a new WIM with VBScipt support every time. Anyhow, I'm not going to touch a thing while it's working, especially as I need to make the move to Autopilot.

Mike
Mike
26 days ago
Reply to  Andy

Hi Andy,

Running into this as well as I'm on Server 2022 21H2 so I can't install the KB either. If you can, can you provide the steps you took to patch WinPE? Much appreciated!

david
david
1 month ago

Hello all, I've discovered this website and it helps me a lot.I would like to deploy W10 and W11. but I have an issue that I can't resolve. My setup: Virtual Box Winserver 2022 ADK: 10.1.22621.1 WinPE: 10.1.22621.1 MDT : 6.3.8456.1000 W11 21H2 client with PXE Boot W10 22H2 client with PXE Boot I succeed to boot via network and launch my task sequence. Unfortunately I have this issue "Unable to determine Destination Disk Partition, and/or Drive. See BDD LOG for more information." like this The same issue happen with VMWare WorkStation. On my previous lab I was able to… Read more »

david
david
1 month ago

Thanks for your feedback. I've checked my other VMWare configuration (which works) and it seems the problem was my customs.ini. Indeed, in my lab on virtual Box with the wrong custom.ini= OSInstall=Y SkipAppsOnUpgrade=YES SkipCapture=YES SkipAdminPassword=YES SkipDeploymentType=YES SkipComputerBackup=YES SkipProductKey=YES SkipUserData=YES SkipLocaleSelection=YES KeyboardLocale=fr-FR InputLocale=040c:0000040c UILanguage=fr-FR TimeZone=105 TimeZoneName=Romance Standard Time SkipBitLocker=YES SkipBitLockerDetails=YES SkipBDDWelcome=YES SkipTimeZone=YES SkipApplications=NO SkipDestinationDisk=YES DoNotFormatAndPartition=YES "SkipDestinationDisk"" and "DoNotFormatAndPartition" were setuped on "YES". when I changed it to "NO". the problem has gone. I think it's that because now it works… I hope it's the case and I cross my fingers… I've modified the custom.in on my new VMWare machine and it… Read more »

ABaut
ABaut
1 month ago

Thisis my first set up to create a deployment server an I need to deploy Windows 11 23H2 sadly. So im follow this article and read a lot of the related information in the links, now I have my updated wimpe.wim image with the right components installed but im not able to avoid MDT to install again those components, I have this XML into the template folder: <Definition>  <WindowsPE>   <!– Settings –>   <Version />   <Source modified="2024-02-23 15:47:04Z">C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim</Source>   <ScratchSpace>32</ScratchSpace>   <ImageName>Lite Touch Windows PE (x64)</ImageName>   <ImageDescription>Lite Touch Windows PE (x64)</ImageDescription>   <!– Components –>   <Components>… Read more »

Austin
Austin
2 months ago

you saved my life with this article. thanks man.

Khro
Khro
3 months ago

Hello,
I tried to update the winpe.wim (C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us) directly using latest cumulative (december) and it's not working.
The same with the november one.

I tried after to update the LiteBoot using the latest cumulative (december) and it's not working too.
It's working fine updating the LiteTouch one with the november cumulative. Do you know why?
Thanks.

Torsten
Torsten
3 months ago

I don't understand the copying of the LiteTouchPE.xml. If I copy the file to Templates and delete the lines, fewer components are added when updating the DeploymentShare in WinPE than if I leave Templates empty. In both cases, however, the imaging works afterwards. What is the background/sense? Templates directory empty and update of the DeploymentShare (as before the ADK update and patching): Added component winpe-hta Added component winpe-scripting Added component winpe-wmi Added component winpe-securestartup Added component winpe-fmapi Added component winpe-dismcmdlets Added component winpe-mdac Added component winpe-netfx Added component winpe-powershell Added component winpe-securebootcmdlets Added component winpe-storagewmi Templates directory with customized LiteTouchPE.xml… Read more »

Klaus
Klaus
4 months ago

After installing ADK 10.1.25398.1 and MDT 8456 (6.3.8456.1000), as well as updating "Unattend_PE_x64" and recreating the ISO,… 

the installation got stuck with the message "The value for the attribute is not valid: language' in the Litetouch.wsf script".

I have memdocs/memdocs/configmgr/mdt/known-issues.md on main – MicrosoftDocs/memdocs – GitHub, etc.

any tip for me. ? 

When I try to run "wscript" within Winpe, it seems that wscript is not present.

Translated with DeepL.com (free version)

Klaus

Luis Sanchez
Luis Sanchez
4 months ago

Can somebody upload the files here for a lazy IT guy?

francaaa
francaaa
5 months ago

I also affected by this issue, the article is great, but there is a problem with FODs availability. I've spent last two evenings trying to extract them from various builds from uup dump. Finally found the files here: https://pixeldrain.com/u/ufNfBhTV. Johan can you please compute FODs hashes to verify? Thanks.

Jon Swarner
Jon Swarner
4 months ago

Thank you @francaaa and Johan.

oktech
oktech
5 months ago

Hello Johan, and thanks for the great work. I was able to get pass the WinPE issue with your fix. But however i get the below error when i try to generate a "catalog" for the wim file directly from MDT. Any help will be appreciated. Performing the operation "generate" on target "Catalog". Starting: "C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.Catalog40.exe" "D:\MDT\RefDeploymentShare-en\Operating Systems\Windows_11_Ent_x64_v22H2_Barebone\Sources\install.wim" 3 > "C:\Users\*\AppData\Local\Temp\Microsoft.BDD.Catalog.log" 2>&1 Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.   at Microsoft.BDD.Catalog.Program.DoCatalog()   at Microsoft.BDD.Catalog.Program.Main(String[] args) Non-zero return code from catalog utility,… Read more »

Peter
Peter
4 months ago
Reply to  oktech

In "C:\Program Files\Microsoft Deployment Toolkit\Bin\DeploymentTools.xml"

Change the line:

  <tool name="imgmgr.exe">%ADKPath%\Deployment Tools\WSIM</tool>

To:

  <tool name="imgmgr.exe">%ADKPath%\Deployment Tools\WSIM\%RealPlatform%</tool>

Last edited 4 months ago by Peter
Kelly
Kelly
5 months ago

Installed 23h2 on a VM that was released today. Couldn't find the VB FOD.

Kurt Peterson
Kurt Peterson
5 months ago

I'm experiencing the VBScript error after trying the Hydration Kit for the first time and trying to deploy DC01. I'm new to MDT and trying to work through the instructions at the moment…

Kurt Peterson
Kurt Peterson
5 months ago

This worked, and DC01 finished building successfully after I:
*I uninstalled the new ADK build 25398 for "Windows ADK 11 WinPE Addon" and "Windows ADK 11" in that order.

*I installed the older Windows ADK build 22000 from June 2021

*Deleted and rebuilt: HydrationCMWS2019.iso

*Manully built DC01 in client Hyper-V

Kurt
Kurt
5 months ago

Thank you, and that worked using ADK build 22000

GovGeek
GovGeek
5 months ago

Super awesome! Most things seem to be working once we grabbed those CAB files and staged them in the Setup folder. Successfully deploying Win10 and Win11 from MDT. Only issue appears to be that WinRE is no longer working after imaging. The partition is present as per the task sequence, but no Recovery.

GovGeek
GovGeek
5 months ago

Thanks Johan, unfortunately I'm unfamiliar with this process since MDT always took care of it natively prior to updating to the latest ADK. I'm researching as much as I can on the topic. Still appreciate the help with this VB issue, at least we're able to deploy now.

avi kroparo
avi kroparo
4 months ago
Reply to  GovGeek

you can solve it add the the wim from dart as winre.

avi kroparo
avi kroparo
6 months ago

another issue i fond is related to creating dart boot media with semptember adk it will fail due to the fmapi.cab in the C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs folder.
to resolve it i renamed the fmapi.cab to fmapi.cab.old and replaced it with 22621 adk fmapi.cab then i was able to create the dart boot media.


>