@@ -85,7 +85,7 @@ function Invoke-WinUtilISOScript {
8585 function Set-ISOScriptReg {
8686 param ([string ]$path , [string ]$name , [string ]$type , [string ]$value )
8787 try {
88- & reg add $path / v $name / t $type / d $value / f | Out-Null
88+ & reg add $path / v $name / t $type / d $value / f
8989 & $Log " Set registry value: $path \$name "
9090 } catch {
9191 & $Log " Error setting registry value: $_ "
@@ -95,7 +95,7 @@ function Invoke-WinUtilISOScript {
9595 function Remove-ISOScriptReg {
9696 param ([string ]$path )
9797 try {
98- & reg delete $path / f | Out-Null
98+ & reg delete $path / f
9999 & $Log " Removed registry key: $path "
100100 } catch {
101101 & $Log " Error removing registry key: $_ "
@@ -155,7 +155,7 @@ function Invoke-WinUtilISOScript {
155155 ' MicrosoftCorporationII.MicrosoftFamily' ,
156156 ' MicrosoftCorporationII.QuickAssist' ,
157157 ' MSTeams' ,
158- ' MicrosoftTeams' ,
158+ ' MicrosoftTeams'
159159 )
160160
161161 $packagesToRemove = $packages | Where-Object {
@@ -184,11 +184,11 @@ function Invoke-WinUtilISOScript {
184184 # 4. Registry tweaks
185185 # ═════════════════════════════════════════════════════════════════════════
186186 & $Log " Loading offline registry hives..."
187- reg load HKLM\zCOMPONENTS " $ScratchDir \Windows\System32\config\COMPONENTS" | Out-Null
188- reg load HKLM\zDEFAULT " $ScratchDir \Windows\System32\config\default" | Out-Null
189- reg load HKLM\zNTUSER " $ScratchDir \Users\Default\ntuser.dat" | Out-Null
190- reg load HKLM\zSOFTWARE " $ScratchDir \Windows\System32\config\SOFTWARE" | Out-Null
191- reg load HKLM\zSYSTEM " $ScratchDir \Windows\System32\config\SYSTEM" | Out-Null
187+ reg load HKLM\zCOMPONENTS " $ScratchDir \Windows\System32\config\COMPONENTS"
188+ reg load HKLM\zDEFAULT " $ScratchDir \Windows\System32\config\default"
189+ reg load HKLM\zNTUSER " $ScratchDir \Users\Default\ntuser.dat"
190+ reg load HKLM\zSOFTWARE " $ScratchDir \Windows\System32\config\SOFTWARE"
191+ reg load HKLM\zSYSTEM " $ScratchDir \Windows\System32\config\SYSTEM"
192192
193193 & $Log " Bypassing system requirements..."
194194 Set-ISOScriptReg ' HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' ' SV1' ' REG_DWORD' ' 0'
@@ -300,11 +300,11 @@ function Invoke-WinUtilISOScript {
300300 Set-ISOScriptReg ' HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Mail' ' PreventRun' ' REG_DWORD' ' 1'
301301
302302 & $Log " Unloading offline registry hives..."
303- reg unload HKLM\zCOMPONENTS | Out-Null
304- reg unload HKLM\zDEFAULT | Out-Null
305- reg unload HKLM\zNTUSER | Out-Null
306- reg unload HKLM\zSOFTWARE | Out-Null
307- reg unload HKLM\zSYSTEM | Out-Null
303+ reg unload HKLM\zCOMPONENTS
304+ reg unload HKLM\zDEFAULT
305+ reg unload HKLM\zNTUSER
306+ reg unload HKLM\zSOFTWARE
307+ reg unload HKLM\zSYSTEM
308308
309309 # ═════════════════════════════════════════════════════════════════════════
310310 # 5. Delete scheduled task definition files
0 commit comments