tiny11builder icon indicating copy to clipboard operation
tiny11builder copied to clipboard

parameter name 'StartComponentCleanup' not match on latest script

Open aesirvalor opened this issue 10 months ago • 18 comments

Hi, i run the latest script , so far it run fine, when about the end at clean up stage , there is an error, the error was

The operation completed successfully. Cleaning up image... Repair-WindowsImage : A parameter cannot be found that matches parameter name 'StartComponentCleanup'. At D:\WIN11-TINY\tiny11builder24h2\tiny11maker.ps1:388 char:51 ... owsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetB ... ~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo : InvalidArgument: (:) [Repair-WindowsImage], ParameterBindingException FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Dism.Commands.RepairWindowsImageCommand

the code in line 388 is Repair-WindowsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetBase

but the image was created successful, is it ok to ignore the message ?, and the out iso file size is 5,623,754,752 , its not much different the the input size 5,819,486,208

iam using windows 10 with powershell version:

Name Value

PSVersion 5.1.19041.2364 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.2364 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

aesirvalor avatar Jan 18 '25 05:01 aesirvalor

im getting same exact error,did you found a fix for it? idk if i should skip or nah

F3NiCy avatar Jan 21 '25 11:01 F3NiCy

Seems Argument "-StartComponentCleanup" is removed from Dism Module Function "Repair-WindowsImage" ... it is not offered in PowerShell 5 and 7 anymore. Documentation still says it should be there.

gunnarhaslinger avatar Jan 22 '25 13:01 gunnarhaslinger

Image

could it be removed for offline image? for online images (running Windows it still works.

Karl-WE avatar Feb 17 '25 14:02 Karl-WE

ok it will fail at the end.

Image

Karl-WE avatar Feb 17 '25 14:02 Karl-WE

@gunnarhaslinger @ntdevlabs ideas?

Karl-WE avatar Feb 17 '25 14:02 Karl-WE

To shrink the WIM-File you have to use "Export-WindowsImage" not "Repair-WindowsImage". By using it with Argument "-compressionType max" it will be smallest possible.

gunnarhaslinger avatar Feb 17 '25 14:02 gunnarhaslinger

Can someone send screen shot what commands should I put to fix it please, I'm little confused 🙏

F3NiCy avatar Feb 17 '25 14:02 F3NiCy

@F3NiCy sorry for the wrong pointers. This should work if you edit your own script. & 'dism' '/English' "/image:$ScratchDisk\scratchdir" '/Cleanup-Image' '/StartComponentCleanup' '/ResetBase' | Out-Null

Karl-WE avatar Feb 17 '25 16:02 Karl-WE

@F3NiCy my last comment might be invalid. see I understand your confusion https://github.com/ntdevlabs/tiny11builder/issues/321#issuecomment-2663362337

I would need some time to test this.

Karl-WE avatar Feb 17 '25 17:02 Karl-WE

Can confirm replacing line Repair-WindowsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetBase with @Karl-WE recommendation of & 'dism' '/English' "/image:$ScratchDisk\scratchdir" '/Cleanup-Image' '/StartComponentCleanup' '/ResetBase' | Out-Null worked great! No longer getting the Repair-WindowsImage : A parameter cannot be found that matches parameter name 'StartComponentCleanup' error.

jwidess avatar Mar 29 '25 00:03 jwidess

@jwidess @ntdevlabs good to hear, sorry I broke the code. I have no idea why the PS is limited here. Will also adress the other regression about too large Image

Karl-WE avatar Mar 29 '25 09:03 Karl-WE

im getting same exact error,did you found a fix for it? idk if i should skip or nah

@Karl-WE I don't care for the size of the iso itself but I need to get working Windows 11 installations without crap out of that. Can you tell if these errors and the large ISOs are just a cosmetic thing or does this have any impact on the installation later on?

mangoheini avatar Apr 15 '25 02:04 mangoheini

@mangoheini which Script are you using? Where is the 24H2 iso from?

Karl-WE avatar Apr 15 '25 05:04 Karl-WE

I'm using tiny11maker.ps1 from November '24 release on a Windows 10 Pro Edu (22H2) machine.

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.5737
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.5737
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

My Windows ISO is Win11_24H2_German_x64.iso directly from Microsoft (SHA256: 96E036F1219F9EE59F96312CE43EC7DF093E768383A77132750271940926A013) and in script I chose Number 7 (Windows 11 Pro Education)

My error is (please excuse the German text):

Cleaning up image...
PS>TerminatingError(Repair-WindowsImage): "Es wurde kein Parameter gefunden, der dem Parameternamen "StartComponentCleanup" entspricht."
Repair-WindowsImage : Es wurde kein Parameter gefunden, der dem Parameternamen "StartComponentCleanup" entspricht.
In C:\t11\tiny11maker.ps1:385 Zeichen:51
+ ... owsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetB ...
+                                            ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Repair-WindowsImage], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Dism.Commands.RepairWindowsImageCommand
Repair-WindowsImage : Es wurde kein Parameter gefunden, der dem Parameternamen "StartComponentCleanup" entspricht.
In C:\t11\tiny11maker.ps1:385 Zeichen:51
+ ... owsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetB ...
+                                            ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Repair-WindowsImage], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Dism.Commands.RepairWindowsImageCommand

Cleanup complete.

Size of Win11_24H2_German_x64.iso is 5.828.616.192 Bytes and size of resulting tiny11.iso is 5.662.822.400 Bytes

@Karl-WE I also wonder if there is any (OS / Script / ISO / ...) combination that would not trigger that error.

mangoheini avatar Apr 15 '25 08:04 mangoheini

Mh, interesting. During run the script shows some more errors before that output:

Owner changed to Administrators.
Permissions modified for Administrators group.
Registry key permissions successfully updated.
Deleting Application Compatibility Appraiser
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
Deleting Customer Experience Improvement Program
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
Deleting Program Data Updater
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
Deleting autochk proxy
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
Deleting QueueReporting
FEHLER: Der angegebene Registrierungsschlüssel bzw. Wert wurde nicht gefunden.
Tweaking complete!
Unmounting Registry...
FEHLER: Falscher Parameter.
FEHLER: Falscher Parameter.
Der Vorgang wurde erfolgreich beendet.
Cleaning up image...
Repair-WindowsImage : Es wurde kein Parameter gefunden, der dem Parameternamen "StartComponentCleanup" entspricht.
In C:\t11\tiny11maker.ps1:385 Zeichen:51
+ ... owsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetB ...
+                                            ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Repair-WindowsImage], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Dism.Commands.RepairWindowsImageCommand

Cleanup complete.

mangoheini avatar Apr 15 '25 08:04 mangoheini

OK the errors are ok. Basically changes in appraiser and a Code issue for compression of the Image.

You are good to go with this image

I would still recommend installing Edge Browser and care to enable all security settings in Defender.

Karl-WE avatar Apr 15 '25 08:04 Karl-WE

OK the errors are ok. Basically changes in appraiser and a Code issue for compression of the Image.

You are good to go with this image

I would still recommend installing Edge Browser and care to enable all security settings in Defender.

So to be sure: This is just affecting the size of the resulting tiny11.iso but not in any way the resulting os installation?

Why are you recommending installing Edge afterwards? I'm Firefox user and I've always been annoyed by Edge sneaking back onto Desktop after updates. 😅

mangoheini avatar Apr 15 '25 09:04 mangoheini

At the moment it is just affecting the size. Tested yesterday. You can drive whatever suits you. Edge however is the only Chromium based open-source browser that is capable to protect you by teaming up with Edge (while many good protections need to enabled).

Karl-WE avatar Apr 16 '25 14:04 Karl-WE

Confirm that error on Windows 10 Pro, but it didn't affect anything. Used official Win11_24H2_Ukrainian_x64.iso (5 506 615 296 Bytes) and got an error on Windows 10 Pro 22H2, PSVersion 5.1.19041.6328 Size of resulting tiny11.iso (4 143 026 176 Bytes) After try the same without changes in script on Windows 11 Pro 24H2, PSVersion 5.1.26100.6584 Size of resulting tiny11.iso (4 144 349 184 Bytes) Afterwards I installed it on the machine using an image made on Windows 10 to make sure it worked. I didn't see any problems or errors.

Dobrynya95 avatar Sep 12 '25 10:09 Dobrynya95