alaurie / wimwitchfk Goto Github PK
View Code? Open in Web Editor NEWGeneral clean up of WimWitch script before converting into a PowerShell module.
License: MIT License
General clean up of WimWitch script before converting into a PowerShell module.
License: MIT License
When using ConfigMgr as the update source for Windows 11 Version 22H2, WIM Witch is seeing the full Windows 11 upgrade package as optional and is attempting to download it.
I haven't had a chance to dig into the code in an attempt to determine why this is happening, but it seems Microsoft is using the same KB number for the April 2023 Windows 11 Version 22H2 cumulative update as it is for the full Windows 11 upgrade package. It's possible this could be the reason.
I am very excited to see this project, thank you!
However, when I attempt to run WimWitchFK.ps1 from version 4.0.1 in an admin PowerShell console, it flashes and goes back to the prompt, without going through the usual prompts and opening WimWitch. I am able to run WimWitchfk version 3.4.6 and the last version of the original Wimwitch successfully. Is this because version 4.0.1 is still being worked on, or is there something additional I need to do? I do see that it requires modules OSDSUS, OSDUpdate, and ShellID, could these requirements somehow affect 4.01 but not the previous versions? I notice that there is also a .psd1 file and a .psm1 file in the latest version, which did not exist before. I would love to be able to customize Windows 11 23H2 and your program appears to be the best program to use! I used Wimwitch to customize Windows 10 21H2, Windows 10 22H2, and Windows 11 22H2 successfully and have deployed out the customized versions successfully. Windows 11 Pro also has a lot of junkware in the start menu and such and it would be wonderful to remove them if possible.
Thanks for any help you can provide!
Cheers,
Rootabagga
When you select the Enable app removal button it launches a window to select the apps you want to remove.
When I click the select button I get an error that says
WARNING: No matching Appx list file found for build Unknown Version
Brand new version of WimWitch installed on a Fresh Windows 11 install.
Just started using the forked version not too long ago--appreciate your efforts to continue this project.
I'm unsure if the last update may have unbalanced the brackets on the initial script which brings over the necessary scripts, folders, and tools. I took a look through it and couldn't find exactly where Powershell believes this brackets to be missing, but perhaps you can review when you have some time.
Before WimWim even installs, I see these errors:
At C:\temp\WimWitch\WimWitch.ps1:6990 char:16
+ } Else {
+ ~
Missing closing '}' in statement block or type definition.
At C:\temp\WimWitch\WimWitch.ps1:6986 char:9
+ try {
+ ~
Missing closing '}' in statement block or type definition.
At C:\temp\WimWitch\WimWitch.ps1:8241 char:30
+ $Form.ShowDialog() | Out-Null #This starts the GUI
+ ~
The Try statement is missing its Catch or Finally block.
At C:\temp\WimWitch\WimWitch.ps1:6964 char:34
+ Function Invoke-MakeItSo ($appx) {
+ ~
Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingEndCurlyBrace
Once I import a 23H2 ISO, under .\WimWitchFK-main\imports, it creates sub-directories for 22H2. The .\WimWitchFK-main\updates\Windows 11 folder correct creates 23H2 folders after downloading updates.
Got an error when trying to run. Renamed .\WimWitchFK-main\imports\DotNet\Windows 11\22H2 and .\WimWitchFK-main\imports\iso\Windows 11\22H2 to 23H2 and it works now.
11/02/2023 14:12:48 Information - Checking to see if the staging path exists...
11/02/2023 14:12:48 Information - The path existed, and it has been purged.
11/02/2023 14:12:48 Warning - .Net 3.5 Binaries are not present for 23H2
11/02/2023 14:12:48 Warning - Import .Net from an ISO or disable injection to continue
11/02/2023 14:23:58 Information - D:\WimWitchFK-main\Mount
11/02/2023 14:28:17 Warning - ISO Binaries are not present for Windows 11 23H2
11/02/2023 14:28:17 Warning - Import ISO Binaries from an ISO or disable ISO/Upgrade Package creation
11/02/2023 14:28:17 Error - Discarding WIM and not making it so
I just downloaded the Windows 11 23H2 February Update. Everything works fine (so far) until I get to the point to remove apps.
When you Enable App Removal and hit the select button, it's supposed to populate a list of apps to select to remove.
When I enable App removal and hit select I see the following in the PowerShell window:
02/29/2024 13:58:13 Information - Looking for Appx list file D:\WimWitchFK\Private\Assets\appxWin11_Unknown Version.txt
WARNING: No matching Appx list file found for build Unknown Version.
I noticed on the Source WIM tab, the version is "Unknown Version" instead of 23H2.
Now if I make a copy of the "appxWin11_23H2" text file located in the \Private\Assets folder and name it "appxWin11_Unknown Version", it will then populate the list for me. To me this is only a workaround, so I wanted to bring it to your attention with the latest ISO from the Microsoft 365 Admin Center.
I tried the new 4.0.1 version this month to prep updated media for Configuration Manager OSD tasks, and I encountered some issues. I grabbed a screen shot of the PowerShell window while I was trying to patch Server 2019, but I noticed the same behavior for Server 2022 and Windows 11 23H2. A warning appeared with a path that didn't exist, and I think it because it has Unkown Version in the path. I ended up using the script version 3.4.8 to patch the wim's.
The finished wim is not patched as it didn't apply the updates to the source wim file.
Not sure how to fix but I think the issue is due to the path having Unknown Version
C:\wimwitch\updates\Windows Server\unknown version\SSU
C:\wimwitch\updates\Windows Server\unknown version\LCU
C:\wimwitch\updates\Windows Server\unknown version\AdobeSu
C:\wimwitch\updates\Windows Server\unknown version\DotNet
C:\wimwitch\updates\Windows Server\unknown version\DotNetCu
Module version used: 4.0.1
Operating System = Windows 10 22H2
PowerShell version:5.1.19041.4123
When using ConfigMgr as the update catalog source, the new UUP CUs from Microsoft do not get parsed properly and fail to download.
Based on the current code, WIM Witch uses the SourceURL attribute returned from the WMI lookup to the update catalog. The problem is, the new UUP updates have multiple source URLs and WIM Witch is not built to handle multiple source URLs being returned from the update catalog.
Additionally, even if we were to rewrite the script to look for the update CAB file, Microsoft has stated that this CAB will not work to service a WIM and we should instead retrieve the full MSU directly from the Microsoft Update Catalog.
David Segura has also removed these updates from OSDSUS due to the same issue.
It seems like a rewrite is needed to look up the update and download it directly from Microsoft without relying on data from ConfigMgr itself.
On attempting to apply the updates to a WIM, the image will not update stating Cannot find path as it's duplicating it twice.
02/07/2024 11:49:37 Information - Mounting source WIM D:\WIMWitch\Staging\Win11Pro-23H2-Feb24.wim
02/07/2024 11:49:37 Information - to mount point:
02/07/2024 11:49:37 Information - D:\WIMWitch\Mount
02/07/2024 11:52:03 Information - Language Packs Injection not selected. Skipping...
02/07/2024 11:52:03 Information - Local Experience Packs not selected. Skipping...
02/07/2024 11:52:03 Information - Features On Demand not selected. Skipping...
02/07/2024 11:52:03 Information - JSON not selected. Skipping JSON Injection
02/07/2024 11:52:03 Information - Drivers were not selected for injection. Skipping.
02/07/2024 11:52:03 Information - Default Application Association not selected. Skipping...
02/07/2024 11:52:03 Information - Start Menu Layout injection not selected. Skipping...
02/07/2024 11:52:03 Information - Registry file injection not selected. Skipping...
02/07/2024 11:52:03 Information - Applying D:\WIMWitch\updates\Windows 11\23H2\LCU\2024-01 Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5034123)
02/07/2024 11:52:03 Information - Windows 11 required LCU modification started...
02/07/2024 11:52:03 information - Copying LCU file to staging folder...
Get-ChildItem: D:\WIMWitch\WIMWitchFK.ps1:1338
Line |
1338 | $filename = (Get-ChildItem -Path $packagepath -Name)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\WIMWitch\updates\Windows 11\23H2\LCU\D:\WIMWitch\updates\Windows 11\23H2\LCU\2024-01
| Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5034123)' because it does not exist.
Copy-Item: D:\WIMWitch\WIMWitchFK.ps1:1339
Line |
1339 | Copy-Item -Path $packagepath\$filename -Destination $PSScript …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\WIMWitch\updates\Windows 11\23H2\LCU\D:\WIMWitch\updates\Windows 11\23H2\LCU\2024-01
| Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5034123)\' because it does not exist.
02/07/2024 11:52:03 information - Changing file extension type from CAB to MSU...
Rename-Item: D:\WIMWitch\WIMWitchFK.ps1:1344
Line |
1344 | Rename-Item -Path $PSScriptRoot\staging\$filename -NewName $n …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Access to the path 'D:\WIMWitch\Staging\' is denied.
02/07/2024 11:52:03 information - Applying LCU...
02/07/2024 11:52:03 information - D:\WIMWitch\staging\Staging.msu
Get-Item: D:\WIMWitch\WIMWitchFK.ps1:1348
Line |
1348 | $updatename = (Get-Item -Path $packagepath).name
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\WIMWitch\updates\Windows 11\23H2\LCU\D:\WIMWitch\updates\Windows 11\23H2\LCU\2024-01
| Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5034123)' because it does not exist.
02/07/2024 11:52:03 Warning - Failed to apply update
02/07/2024 11:52:03 Warning - Cannot bind argument to parameter 'Data' because it is an empty string.
02/07/2024 11:52:03 Information - Applying D:\WIMWitch\updates\Windows 11\23H2\DotNetCU\2023-11 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 11 for x64 (KB5032340)
02/07/2024 11:52:07 Warning - Failed to apply update
02/07/2024 11:52:07 Warning - Invalid package path
02/07/2024 11:52:07 Information - Applying D:\WIMWitch\updates\Windows 11\23H2\DotNetCU\2023-11 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 11 version 23H2 for x64 (KB5032007)
02/07/2024 11:52:09 Warning - Failed to apply update
02/07/2024 11:52:09 Warning - Invalid package path
02/07/2024 11:52:09 Information - Applying D:\WIMWitch\updates\Windows 11\23H2\DotNetCU\2024-01 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 11 for x64 (KB5034276)
02/07/2024 11:52:11 Warning - Failed to apply update
02/07/2024 11:52:11 Warning - Invalid package path
02/07/2024 11:52:11 Information - Applying D:\WIMWitch\updates\Windows 11\23H2\DotNetCU\2024-01 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 11 version 23H2 for x64 (KB5033920)
02/07/2024 11:52:13 Warning - Failed to apply update
02/07/2024 11:52:13 Warning - Invalid package path
02/07/2024 11:52:13 Information - OneDrive agent update skipped as it was not selected
02/07/2024 11:52:13 Information - Starting AppX removal
02/07/2024 11:52:17 Information - Removing Microsoft.HEIFImageExtension_1.0.43012.0_x64__8wekyb3d8bbwe
02/07/2024 11:52:21 Information - Removing Microsoft.MicrosoftSolitaireCollection_4.12.3171.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:25 Information - Removing Microsoft.Xbox.TCUI_1.23.28004.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:29 Information - Removing Microsoft.XboxGameOverlay_1.47.2385.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:32 Information - Removing Microsoft.XboxGamingOverlay_2.622.3232.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:36 Information - Removing Microsoft.XboxIdentityProvider_12.50.6001.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:40 Information - Removing Microsoft.XboxSpeechToTextOverlay_1.17.29001.0_neutral_~_8wekyb3d8bbwe
02/07/2024 11:52:40 Information - Attempting to copy log to mounted image
02/07/2024 11:52:40 Information - Log filed copied successfully
02/07/2024 11:52:40 Information - Dismounting WIM file, committing changes
Using the GUI, loading a config file and hitting 'Make it So', everything works as expected
Running 'Wimwitch.ps1 -auto -autofile -DownloadUpdates -Win10Version 22H2' gives errors at line 2402
The script continues but doesn't do anything of note, no wim file is created
I had to refer back to the 3.4.6 version of wimwitch but think I've managed to make the necessary changes in 3.4.8
Line 2402 changed to:
Update-Log -Data $WWScriptVer
Line 2403 added:
Invoke-MakeItSo -appx $global:SelectedAppx
Hope this helps anyone having issues fully automating this, and makes it to 3.4.9
I noticed after importing the Windows 11 23H2 wim from the iso, that after selecting the new source wim file and selecting the correct edition the Build information seems to indicate Windows 11 22H2. It was my understanding that Windows 11 23H2 would build 10.0.22631.xxxx. Maybe I did something incorrect but seems like a possible bug.
Hello,
first, thanks to hold wimwitch alive :)
here the issue:
i´m not able to inject windows 11 23h2 LP and FOD to the image.
If i try it i´ll get this error:
Error - Source not found. Please import some Demanding Features and try again
But the LP´s and FOD´s are still imported.
When importing the new WimWitchFK module on a computer for the first time, it should load and then detect if OSDSUS and OSDUpdate are installed. If they are not, WimWitch will prompt to install NuGet and then use that to install OSDSUS and OSDUpdate.
With the new module, both OSDSUS and OSDUpdate are marked as required modules in both the manifest files and main PS script, so if they are not installed ahead of time, the module will fail to import.
Removing the module requirements for OSDSUS and OSDUpdate from both scripts allows the module to import and run normally, at which point it detects they are missing and will install them automatically.
In addition to some of the previously reported quirky issues with a 23H2 ISO/WIM being detected as 22H2, I'm starting to run into issues with AppX removal on a 23H2 WIM.
When I set up 4.0.1, I started with a brand-new configuration and imported WIM. Initially, the AppX failure looked like it was just Clipchamp, which was also first in the list, and once I removed that app from the removal list, the remaining apps would be successfully removed with no errors reported.
On the next time I ran through that WIM, the first AppX package listed once again reported a failure and none of the apps were removed. The WIM Witch log reports:
02/21/2024 14:37:35 Error - Failed to remove Microsoft.BingNews_4.2.27001.0_neutral_~_8wekyb3d8bbwe Microsoft.BingWeather_4.53.33420.0_neutral_~_8wekyb3d8bbwe Microsoft.GamingApp_2021.427.138.0_neutral_~_8wekyb3d8bbwe Microsoft.GetHelp_10.2201.421.0_neutral_~_8wekyb3d8bbwe Microsoft.Getstarted_2021.2204.1.0_neutral_~_8wekyb3d8bbwe Microsoft.MicrosoftOfficeHub_18.2204.1141.0_neutral_~_8wekyb3d8bbwe Microsoft.MicrosoftSolitaireCollection_4.12.3171.0_neutral_~_8wekyb3d8bbwe Microsoft.windowscommunicationsapps_16005.14326.20544.0_neutral_~_8wekyb3d8bbwe Microsoft.WindowsFeedbackHub_2022.106.2230.0_neutral_~_8wekyb3d8bbwe Microsoft.Xbox.TCUI_1.23.28004.0_neutral_~_8wekyb3d8bbwe Microsoft.XboxGameOverlay_1.47.2385.0_neutral_~_8wekyb3d8bbwe Microsoft.XboxGamingOverlay_2.622.3232.0_neutral_~_8wekyb3d8bbwe Microsoft.XboxIdentityProvider_12.50.6001.0_neutral_~_8wekyb3d8bbwe Microsoft.XboxSpeechToTextOverlay_1.17.29001.0_neutral_~_8wekyb3d8bbwe Microsoft.YourPhone_1.22022.147.0_neutral_~_8wekyb3d8bbwe Microsoft.ZuneMusic_11.2202.46.0_neutral_~_8wekyb3d8bbwe Microsoft.ZuneVideo_2019.22020.10021.0_neutral_~_8wekyb3d8bbwe 02/21/2024 14:37:35 Error - The parameter is incorrect.
The DISM log reports:
DISM DISM Appx Provider: PID=3304 TID=14760 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(2059)\AppxProvider.dll!00007FFCA8CD41C3: (caller: 00007FFCA8C9B0D5) ReturnHr(3) tid(39a8) 80070057 The parameter is incorrect.
Msg:[Failed to determine whether package full name Microsoft.BingNews_4.2.27001.0_neutral_~_8wekyb3d8bbwe
2024-02-21 14:37:34, Error DISM DISM Appx Provider: PID=3304 TID=14760 Failed while initializing package adapter for package 'Microsoft.BingNews_4.2.27001.0_neutral_~_8wekyb3d8bbwe
2024-02-21 14:37:34, Error DISM API: PID=7940 TID=3036 Failed to remove package - CRemoveAppxCommandObject::InternalExecute(hr:0x80070057)
My DISM logs are also full of all sorts of errors relating to the SSU, shims, etc, prior to the AppX portion. Happy to provide any additional details you may need.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.