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

For those that tried out the latest Windows ADK for Windows 11 22H2, build 25398, 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.

NOTE: The 25398 ADK build should not be used. Microsoft already dropped support for it from ConfigMgr for a reason. Use the 22H2 ADK build instead (22621) or one of the 24H2 ADK versions (May or Dec).

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:  To make MDT "think" you have an x86 version of WinPE optional components, run the below PowerShell snippet:

# Create empty folder for x86 components (not used, but MDT looks for the folder)
$x86Folder = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs"
New-Item -Path $x86Folder -ItemType Directory -Force

Then, 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 16 votes
Article Rating
Subscribe
Notify of
guest
83 Comments
Newest
Oldest Most Voted
Mike
Mike
1 year ago

I am using ADK and WinPE 10.1.22621.1 to build a Windows 11 24H2 image. I am using 22621 because it was supposed to be the most stable and would not produce the script error with LiteTouch.wsf, "The value for the attribute is not valid: language". But, I am still getting the error.

I am not sure what to do at this point.

Mike
Mike
1 year ago

Hi Johan, I am using ADK 10.1.22621.1 and I am still getting the vbscript error: "The value of the attribute is not valid: language". What can I do to fix this?

Courtney
Courtney
1 year ago

Hi Johan, my apologies – I'm quite a noob/new at WDS/MDT – as I've been given the project by my manager… I am getting a plethora of issues with SysPrep not completing, and not being able to capture a Vanilla 24H2 Win 11 PC. My ADK and WinPE are on version 10.1.22621.1. I did try 10.1.25398.1, but thought it would be better to have an older version as it might be more stable. But I am getting the above error language error when trying to install a Vanilla ISO on MDT, I've done the above steps barring the scripts, as… Read more »

N8_Miranda
N8_Miranda
1 year ago

Can you be more specific on what Microsoft has "fixed"? I see the problem as they released the ADK without VBSCRIPT and did not include the files for us to add capabilities. We're using the latest ADK from Spring 2024, and there's still no files to allow us to add VBSCRIPT and the support is not natively enabled like it is in the OS. I was able to steal the files from the recently released 24H2 and then inject them to fix the issue, but I think your "old workaround" is actually the "current workaround". I was not able to… Read more »

N8_Miranda
N8_Miranda
1 year ago

I’m using May 2024 ADK, and my custom HTA using VBscript does not run. The OCs are not included for me to add. What did they “fix”? I downloaded the FoD iso for 24H2 and the VBscript cabs are nicely included now. They were injected perfectly with DISM and all is good. I’ll try Dec 2024 ADK if you’re saying the VBscript is available to add to WinPE. We need to get fully to PS and drop HTA and MDT integration, I know, but hoped AutoPilot was the answer. We’re not ready for Azure-only so we’re punished for using Hybrid… Read more »

Beau
Beau
2 years ago

I'm trying to get this running on my freshly build MDT/WDS server, and I'm running Windows Server 2019 build 1802. This fix released by windows says it's for 23H2 Server OS. My server OS is up to date as well. Am I able to run this fix? Should I go with installing the previous version of ADK? Thanks!

Beau
Beau
2 years ago

Thanks! When you say I can add the fix, are you referring to KB5031373 (not sure that will install on an 1803 build?)… Or were you referring to the longer process? Sorry for the confusion.

Beau
Beau
2 years ago

Thanks. I finally figured that out this morning. Your powershell script was extremely helpful! Thank you for putting this information out there!

Pascal Drummen
Pascal Drummen
2 years ago

Hi i used the script to update the ADK .wim , so i downloaded the update from the catalog, and i used the script to mount the wim file and get the components from the update, and i think it worked.

The only thing i didn't quite understand is note 3.

Note #3: If updating the ADK boot image in the ADK install folder, you need copy the the LiteTouchPE.xml template to
# your deployment share, the templates folder and remove the default components

But when i go to the windows pe features, the fod package doesn't show up

Pascal Drummen
Pascal Drummen
2 years ago

What do you mean with has been added? I have run the script to add it from the update i downloaded from the update catalogue, but it doesn't show up in the list of features.

Could you also comment on this please:

Note #3: If updating the ADK boot image in the ADK install folder, you need copy the the LiteTouchPE.xml template to
# your deployment share, the templates folder and remove the default components

We will try again with the 22H2

Pascal Drummen
Pascal Drummen
2 years ago

Okay, we will. Thanks.

Pascal Drummen
Pascal Drummen
2 years ago

We tried this, but are unable to create the catalogue file even after following all the steps in the guide. We are able to create the catalogue file with the windows system image manager, after a reboot of the server (Or else we get a file in use error) But after creating the catalogue file. it still won't open it in the MDT, it says it can't open an xml or build a catalogue.

Kiem Nguyen
Kiem Nguyen
2 years ago

Hello,

I followed all the steps. I keep getting the error, Failure (5206) the deployment wizard was cancelled or did not complete successfully. Failed to run the action: Install Operating System. The execution of the group (install) has failed and the execution has been aborted. An Action failed. Operation aborted (error 000015FB; Source unknown) RegQueryValueExW is unsuccessful for Software\Microsoft\SMS\Task Sequence, SMSTSEndProgram

Any help would be great. Thank you so much!

Kevin Reed
Kevin Reed
2 years ago

Hi Johan,

Is the modification of the PE wim file still needed when using ADK version 10.0.26100.1, or has this now been resolved so that it's integrated into the ADK's optional PE add-on?

Neville
Neville
2 years ago

Hi Johan, This is very good doc. I have been trying to follow it but struggling to get the VBScript FODs. I have updated to Windows 23H2 ADK(10.1.25398.1) on my MDT (6.3.8456.1000). I get the same "Error: The value for the attribute is not valid : language" Error when I try to deploy an Windows 11 23H2 image. Presently which Windows 11 Insider preview will have these VBscript FODs?

Also If I just need to just run the script https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/New-WinPE23H2WithPowerShellAndVBScript.ps1

where can I get the WinPE11_23H2_PowerShell_VBScript.iso file?

Last edited 2 years ago by Neville
Harlan
Harlan
2 years ago

Thanks Johan.

For anyone dealing with this issue, you just need to run the script against your system running the ADK that you are trying to create the boot image from. I did no other steps.

Very important note — if you use BitLocker and have a Pre-Provision step (manage-bde), it will fail like this:

https://www.reddit.com/r/SCCM/comments/16roju1/troubleshooting_bitlocker_preprovisioning/

You will need to do this (credit to the author):

ADK 25398, Bitlocker failure – Device Management 365 (devmgmt365.com)

I can confirm it works for us.

Harry
Harry
2 years 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 2 years ago by Harry
Harry
Harry
2 years 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 2 years ago by Harry
Kelly Smith
Kelly Smith
2 years 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
2 years ago

Thank you Sir!!

Kelly
Kelly
2 years 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
2 years 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
2 years 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
2 years 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
2 years 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!

Andy
Andy
2 years ago
Reply to  Mike

Hi Mike, apologies for the late reply. Did you get this working, or do you still need help?

david
david
2 years 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
2 years 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
2 years 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 years ago

you saved my life with this article. thanks man.

Khro
Khro
2 years 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
2 years 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
2 years 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
2 years ago

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

francaaa
francaaa
2 years 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
2 years ago

Thank you @francaaa and Johan.

oktech
oktech
2 years 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
2 years 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 2 years ago by Peter
Kelly
Kelly
2 years ago

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

Kurt Peterson
Kurt Peterson
2 years 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
2 years 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
2 years ago

Thank you, and that worked using ADK build 22000

GovGeek
GovGeek
2 years 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
2 years 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
2 years ago
Reply to  GovGeek

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

avi kroparo
avi kroparo
2 years 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.


>