Closed MichTheOcelot closed 7 months ago
Nevermind, this happens due to misuse of the "Scratch Dir" toggle. Would be great to know what it does, apologies for this issue, does remind me of #1353 but has been solved for a while.
I don't really know what this option does either, but I guess ISO files are copied to that custom folder instead of the default directory in %TEMP%
.
Now, @MichTheOcelot, how did you "misuse" the ScratchDir
option the first time?
@CodingWonders Yes, that seems to be the intended use... i thought it would let me choose the sku before having to mount the ISO foolishly- i have been able to reproduce the error with the following actions:
CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T C:::::C CCCCCCTTTTTT T:::::T TTTTTTTTTTTT T:::::T TTTTTT C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T
C:::::C T:::::T T:::::T
C:::::C T:::::T T:::::T
C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C CCCCCC T:::::T T:::::T C:::::CCCCCCCC::::C TT:::::::TT TT:::::::TT CC:::::::::::::::C T:::::::::T T:::::::::T CCC::::::::::::C T:::::::::T T:::::::::T CCCCCCCCCCCCC TTTTTTTTTTT TTTTTTTTTTT
====Chris Titus Tech=====
=====Windows Toolbox=====
Checking if Chocolatey is Installed...
Chocolatey Already Installed
No ISO is chosen+ D:\Downloads
No ISO is chosen+ D:\Downloads\
No ISO is chosen+ win11
Invoking WPFGetIso
_ __ __ _
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
/ \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \
/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | |
\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_|
oscdimg.exe on system: True
File path D:\Downloads\Win11_23H2_English_x64v2.iso
Mounting Iso. Please wait.
Done mounting Iso MSFT_DiskImage (ImagePath = "D:\Downloads\Win11_23H2_English_x64v2.i..., StorageType = 1)
Iso mounted to 'E'
Setting up mount dir and scratch dirs
Mounting Iso. Please wait.
Done setting up mount dir and scratch dirs
Scratch dir is D:\Downloads\Scrach
Image dir is D:\Downloads\micro
Copying Windows image. This will take awhile, please don't use UI or cancel this step!
Copy 1031(s) from E: to D:\Downloads\micro
Copy complete! Total Time: 0m10s
Getting image information D:\Downloads\micro\sources\install.wim
Finding suitable Pro edition. This can take some time. Do note that this is an automatic process that might not select the edition you want.
Selected value '6 : Windows 11 Pro'.....
Done reading and unpacking ISO
*********************************
Check the UI for further steps!!!
Target ISO location: D:\Downloads\qwerty.iso
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 module could not be found.
At line:2421 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 D:\Downloads\micro\sources\install2.wim
Remove old 'D:\Downloads\micro\sources\install.wim' and rename D:\Downloads\micro\sources\install2.wim
Windows image completed. Continuing with boot.wim.
Mounting boot image D:\Downloads\micro\sources\boot.wim into D:\Downloads\Scrach
Loading registry...
Bypassing system requirements on the setup image
Unmounting Registry...
Unmounting image...
Creating ISO image
[INFO] Using oscdimg.exe from: oscdimg.exe
Copying target ISO to the USB drive
Ventoy USB Key is not inserted
Done Copying target ISO to USB drive!
_____
(____ \
_ \ \ ___ ____ ____
| | | / _ \| _ \ / _ )
| |__/ / |_| | | | ( (/ /
|_____/ \___/|_| |_|\____)
Performing Cleanup...
Done. ISO image is located here: D:\Downloads\qwerty.iso
@CodingWonders Yes, that seems to be the intended use... i thought it would let me choose the sku before having to mount the ISO foolishly- i have been able to reproduce the error with the following actions:
- Insert ISO on microwin
- I selected my downloads folder for scratchdir and ticked the option.
- Select your SKU, and tick the copy to ventoy option into the same downloads folder, i named my iso to be "qwerty"
- See log: Weirdly enough it is not the same thing that happened on my initial report, since it did prompt me to where the iso location was and also was able to finish the process, but this time it skipped the entire debloating steps... so instead of failing at the registry modification step it just fails here, still running with defaults (edge and defender on)
CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T C:::::C CCCCCCTTTTTT T:::::T TTTTTTTTTTTT T:::::T TTTTTT C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C T:::::T T:::::T C:::::C CCCCCC T:::::T T:::::T C:::::CCCCCCCC::::C TT:::::::TT TT:::::::TT CC:::::::::::::::C T:::::::::T T:::::::::T CCC::::::::::::C T:::::::::T T:::::::::T CCCCCCCCCCCCC TTTTTTTTTTT TTTTTTTTTTT ====Chris Titus Tech===== =====Windows Toolbox===== Checking if Chocolatey is Installed... Chocolatey Already Installed No ISO is chosen+ D:\Downloads No ISO is chosen+ D:\Downloads\ No ISO is chosen+ win11 Invoking WPFGetIso _ __ __ _ /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ / \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \ / /\/\ \| || (__ | | | (_) | \ /\ / | || | | | \/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| oscdimg.exe on system: True File path D:\Downloads\Win11_23H2_English_x64v2.iso Mounting Iso. Please wait. Done mounting Iso MSFT_DiskImage (ImagePath = "D:\Downloads\Win11_23H2_English_x64v2.i..., StorageType = 1) Iso mounted to 'E' Setting up mount dir and scratch dirs Mounting Iso. Please wait. Done setting up mount dir and scratch dirs Scratch dir is D:\Downloads\Scrach Image dir is D:\Downloads\micro Copying Windows image. This will take awhile, please don't use UI or cancel this step! Copy 1031(s) from E: to D:\Downloads\micro Copy complete! Total Time: 0m10s Getting image information D:\Downloads\micro\sources\install.wim Finding suitable Pro edition. This can take some time. Do note that this is an automatic process that might not select the edition you want. Selected value '6 : Windows 11 Pro'..... Done reading and unpacking ISO ********************************* Check the UI for further steps!!! Target ISO location: D:\Downloads\qwerty.iso 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 module could not be found. At line:2421 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 D:\Downloads\micro\sources\install2.wim Remove old 'D:\Downloads\micro\sources\install.wim' and rename D:\Downloads\micro\sources\install2.wim Windows image completed. Continuing with boot.wim. Mounting boot image D:\Downloads\micro\sources\boot.wim into D:\Downloads\Scrach Loading registry... Bypassing system requirements on the setup image Unmounting Registry... Unmounting image... Creating ISO image [INFO] Using oscdimg.exe from: oscdimg.exe Copying target ISO to the USB drive Ventoy USB Key is not inserted Done Copying target ISO to USB drive! _____ (____ \ _ \ \ ___ ____ ____ | | | / _ \| _ \ / _ ) | |__/ / |_| | | | ( (/ / |_____/ \___/|_| |_|\____) Performing Cleanup... Done. ISO image is located here: D:\Downloads\qwerty.iso
Yeah, but the problem is that, since the script is compiled after making a change, PowerShell doesn't do a great job at displaying errors in a function. I'll have to figure out where the code is failing based on what is output to the command window and update either Invoke-WPFMicrowin.ps1
or the MicroWin helper accordingly.
Describe the bug Using a Win11_23H2_English_x64v2 ISO in microwin on the latest version with defaults (Keep Defender and Edge ticked) will generate an error and ignore Copy to Ventoy, leaving the final file on the desktop. To Reproduce Steps to reproduce the behavior:
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 [INFO] Using oscdimg.exe from: oscdimg.exe Copying target ISO to the USB drive Ventoy USB Key is not inserted Done Copying target ISO to USB drive!
(_ \ \ \ _ | | | / | \ / _ ) | |/ / |_| | | | ( (/ / |___/ _/|| ||__) ISO creation failed. The win11\micro directory has not been removed