winutil icon indicating copy to clipboard operation
winutil copied to clipboard

MicroWin: Cannot use Windows 11 Pro SKU

Open dreamsyntax opened this issue 3 years ago • 11 comments

Describe the bug Choosing Windows 11 Pro in MicroWin always results in this error.

To Reproduce Steps to reproduce the behavior:

  1. Launch Powershell via Windows Terminal as Admin on Windows 11 23H2
  2. Use irm command to launch winutil 23.11.28
  3. Click MicroWin
  4. Select Windows 11 23H2 iso, which is placed in C:\
  5. After the initial processing, pick Windows 11 Pro SKU
  6. The following error occurs

win11pro-microwin-23.11.28.txt

====Chris Titus Tech=====                                                                                               =====Windows Toolbox=====
Checking if Chocolatey is Installed...
Chocolatey Already Installed
File already exists at: C:\Users\user\AppData\Local\Temp\cttlogo.png
Invoking WPFGetIso
         _                     __    __  _
  /\/\  (_)  ___  _ __   ___  / / /\ \ \(_) _ __
 /    \ | | / __|| '__| / _ \ \ \/  \/ /| || '_ \
/ /\/\ \| || (__ | |   | (_) | \  /\  / | || | | |
\/    \/|_| \___||_|    \___/   \/  \/  |_||_| |_|
oscdimge.exe on system: True
File path C:\Win11_23H2_English_x64.iso
Mounting Iso. Please wait.
Done mounting Iso MSFT_DiskImage (ImagePath = "C:\Win11_23H2_English_x64.iso", StorageType = 1)
Iso mounted to 'D'
Setting up mount dir and scratch dirs
Done setting up mount dir and scratch dirs
Copying Windows image. This will take awhile, please don't use UI or cancel this step!
Copy 1031(s) from D: to c:\microwin
Copy complete! Total Time: 0m20s
Getting image information c:\microwin\sources\install.wim
Selected value '1 : Windows 11 Home'.....
Done reading and unpacking ISO

*********************************
Check the UI for further steps!!!
Index chosen: '6' from 6 : Windows 11 Pro
Mounting Windows image. This may take a while.
Mounting complete! Performing removal of applications...
Remove Features from the image
Removing features complete!
Removing Appx Bloat
Invoke-WPFMicrowin : An unexpected error occurred: The specified image is invalid.
Unmount the image or clean up the Wim and then try again.
At line:1940 char:24
+         "WPFMicrowin" {Invoke-WPFMicrowin}
+                        ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-WPFMicrowin

Unmounting Registry...
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Cleaning up image...
Cleanup complete.
Unmounting image...
Exporting image into c:\microwin\sources\install2.wim
Remove old 'c:\microwin\sources\install.wim' and rename c:\microwin\sources\install2.wim
Windows image completed. Continuing with boot.wim.
Mounting boot image c:\microwin\sources\boot.wim into c:\microwinscratch
Loading registry...
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
Bypassing system requirements on the setup image
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Unmounting Registry...
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Unmounting image...
Creating ISO image

OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2012. All rights reserved.
Licensed only for producing Microsoft authorized content.


Scanning source tree (500 files in 43 directories)
Scanning source tree complete (946 files in 86 directories)

Computing directory information complete

Image file is 6210781184 bytes (before optimization)

Writing 946 files in 86 directories to C:\Users\user\AppData\Local\Temp\microwin.iso

100% complete

Storage optimization saved 4 files, 24576 bytes (0% of image)

After optimization, image file is 6212876288 bytes
Space saved because of embedding, sparseness or optimization = 24576

Done.
 _____
(____ \
 _   \ \ ___  ____   ____
| |   | / _ \|  _ \ / _  )
| |__/ / |_| | | | ( (/ /
|_____/ \___/|_| |_|\____)
ISO creation failed. The  c:\microwin  directory has not been removed.

Note I've also deleted the C:\microwin and C:\microwinscratch folders completely each attempt, though I had to use linux to delete these folders for some reason, despite being admin.

Additionally, in the logs it mentions Windows 11 Home for some reason during ISO read.

Expected behavior MicroWin should be able to succeed with Windows 11 Pro SKU

dreamsyntax avatar Dec 02 '23 20:12 dreamsyntax

Try it again I was able to create ISO Successfully Just Make sure u backup your drivers cause sometimes u will experience that issue with no hard drive

noxhosting-io avatar Dec 04 '23 02:12 noxhosting-io

Try it again I was able to create ISO Successfully Just Make sure u backup your drivers cause sometimes u will experience that issue with no hard drive

I have no idea what you are trying to say... I am not injecting any drivers. I tried with/without 'remove edge', 'remove defender' etc... Redid it multiple times. Fails the same each time. It does generate an ISO but the logs say it failed.

If the tool only works with specific Windows 11 ISOs that should probably be noted, since Microsoft distributes a few variants. I used the one they redirect you to if your user agent is coming from a non-windows. I can try one using media creation tool to see if there's any difference, but im skeptical

dreamsyntax avatar Dec 04 '23 05:12 dreamsyntax

Update: No luck when using media creation tool generated image, it doesn't contain a .wim file.

When using the one from the non-windows user agent link the SHA-1 of the image is SHA1: 9d18f7814564421381c94e13c09a9c427baf8018

^ This image has the issue in the original post.

When using media creation tool to build the image: SHA1: 0254e6e2c6169ef6ec69c4e6c02402a046a1b015 This one does not contain the .wim? (I see boot.wim)

--

Final Update: In conclusion, I have the same ISO that KALIXHOSTING is using, they can successfully build microWin. I cannot. media-creation tool can NOT be used to create the ISO - results in a totally different error and is unrelated.

dreamsyntax avatar Dec 04 '23 05:12 dreamsyntax

@dreamsyntax Grab Your ISO from Rufus 4.3 https://github.com/pbatard/rufus/releases/download/v4.3/rufus-4.3.exe

And Restest

As you can see here it works perfectly with no issues Ran in terminal as admin on Windows 11 23h2

see screenshots Screenshot 2023-12-04 at 12 41 24 AM Screenshot 2023-12-04 at 12 51 43 AM Screenshot 2023-12-04 at 12 53 47 AM Screenshot 2023-12-04 at 12 53 57 AM

noxhosting-io avatar Dec 04 '23 06:12 noxhosting-io

@dreamsyntax Grab Your ISO from Rufus 4.3 https://github.com/pbatard/rufus/releases/download/v4.3/rufus-4.3.exe

And Restest

As you can see here it works perfectly with no issues Ran in terminal as admin on Windows 11 23h2

see screenshots

Can you post the SHA1 of your ISO? The filesize seems the same.

Can you also try the feature flags all disabled? (edge, defender, etc)

dreamsyntax avatar Dec 04 '23 18:12 dreamsyntax

SHA1

Get-FileHash "C:\Win11_23H2_English_x64.iso" -Algorithm SHA1 | Format-List

Algorithm : SHA1 Hash : 9D18F7814564421381C94E13C09A9C427BAF8018 Path : C:\Win11_23H2_English_x64.iso


Check the UI for further steps!!! Index chosen: '6' from 6 : Windows 11 Pro Mounting Windows image. This may take a while. Mounting complete! Performing removal of applications... Remove Features from the image Removing features complete! Removing Appx Bloat Removing Defender Removing Edge Removal complete! Create unattend.xml Done Create unattend.xml Copy unattend.xml file into the ISO Done Copy unattend.xml Create FirstRun Done create FirstRun Copy FirstRun.ps1 into the ISO Done copy FirstRun.ps1 Copy link to winutil.ps1 into the ISO ICO file created at: C:\Users\DHL\AppData\Local\Temp\cttlogo.ico Shortcut to winutil created at: c:\microwinscratch\Windows\Users\Default\Desktop\WinUtil.lnk Copy checkinstall.cmd into the ISO Done copy checkinstall.cmd Creating a directory that allows to bypass Wifi setup Loading registry Disabling Teams Done disabling Teams Bypassing system requirements (system image) Removing Edge icon from taskbar Edge icon removed from taskbar Setting all services to start manually Enabling Local Accounts on OOBE Disabling Sponsored Apps Done removing Sponsored Apps Disabling Reserved Storage Changing theme to dark. This only works on Activated Windows Unmounting Registry... Cleaning up image... Cleanup complete. Unmounting image... Exporting image into c:\microwin\sources\install2.wim Remove old 'c:\microwin\sources\install.wim' and rename c:\microwin\sources\install2.wim Windows image completed. Continuing with boot.wim. Mounting boot image c:\microwin\sources\boot.wim into c:\microwinscratch Loading registry... Bypassing system requirements on the setup image Unmounting Registry... Unmounting image... Creating ISO image

OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility Copyright (C) Microsoft, 1993-2012. All rights reserved. Licensed only for producing Microsoft authorized content.

Scanning source tree (500 files in 43 directories) Scanning source tree complete (946 files in 86 directories)

Computing directory information complete

Image file is 5698584576 bytes (before optimization)

Writing 946 files in 86 directories to C:\Users\DHL\AppData\Local\Temp\microwin.iso

100% complete

Storage optimization saved 4 files, 24576 bytes (0% of image)

After optimization, image file is 5700669440 bytes Space saved because of embedding, sparseness or optimization = 24576

Done.


(____
_ \ \ ___ ____ ____ | | | / _ | _ \ / _ ) | |/ / |_| | | | ( (/ / |/ _/|| ||___) Done. ISO image is located here: C:\Users\DHL\AppData\Local\Temp\microwin.iso Performing Cleanup Screenshot 2023-12-04 at 1 28 58 PM

And Again A Successful MicroWin.iso

So The Issue Is on your PC or ISO u are using

noxhosting-io avatar Dec 04 '23 19:12 noxhosting-io

Very strange. We've ruled out the ISO being the problem, at least, since our hashes match. I also was running the creation on a host with Windows 11 23H2 on it.

I can try on another computer but I find this very odd as this was a fresh Windows 11 23H2 installation followed by running Winutil "Laptop" recommended configuration. No other changes to Windows itself.

dreamsyntax avatar Dec 04 '23 21:12 dreamsyntax

@dreamsyntax I would suggest try it on a vm on ur latpop

Because that is strange as it should work with no issues even with those settings applied I tested it out and still successful

noxhosting-io avatar Dec 06 '23 00:12 noxhosting-io

How odd... It worked successfully in a Win 11 23H2 VM (using the same ISO I've been using) I did NOT run windows update or winutil prior to attempting to use microwin, if that matters.

Thanks for the assistance, if you need me to test in the future for my hardware not building I can try later builds.

dreamsyntax avatar Dec 08 '23 19:12 dreamsyntax

@dreamsyntax Glad it worked for you and yes no update is needed but it’s good to have

and Thank U I’ll keep that in Mind

noxhosting-io avatar Dec 09 '23 01:12 noxhosting-io

I've just had the same issue.

simonboet avatar Jan 17 '24 05:01 simonboet