Compare commits

...

3 Commits

Author SHA1 Message Date
CodingWonders
3de92566e2 Update message 2024-12-19 19:17:41 +01:00
CodingWonders
3f2d42fa3f Add detections for expedited app removal
They only affect 24H2 and newer. Earlier releases don't have these expedited apps
2024-12-19 19:17:31 +01:00
CodingWonders
31fc41588b Access specific property of ISO image object
Only show the ISO path. No one is interested in the storage type
2024-12-19 18:55:28 +01:00
2 changed files with 16 additions and 14 deletions

View File

@ -111,7 +111,7 @@ public class PowerManagement {
Write-Host "Mounting Windows image. This may take a while."
Mount-WindowsImage -ImagePath "$mountDir\sources\install.wim" -Index $index -Path "$scratchDir"
if ($?) {
Write-Host "Mounting complete! Performing removal of applications..."
Write-Host "The Windows image has been mounted successfully. Continuing processing..."
} else {
Write-Host "Could not mount image. Exiting..."
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
@ -285,20 +285,22 @@ public class PowerManagement {
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
# Prevent Windows Update Installing so called Expedited Apps
@(
'EdgeUpdate',
'DevHomeUpdate',
'OutlookUpdate',
'CrossDeviceUpdate'
) | ForEach-Object {
Write-Host "Removing Windows Expedited App: $_"
# Prevent Windows Update Installing so called Expedited Apps - 24H2 and newer
if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) {
@(
'EdgeUpdate',
'DevHomeUpdate',
'OutlookUpdate',
'CrossDeviceUpdate'
) | ForEach-Object {
Write-Host "Removing Windows Expedited App: $_"
# Copied here After Installation (Online)
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
# Copied here After Installation (Online)
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
# When in Offline Image
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
# When in Offline Image
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
}
}
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f

View File

@ -169,7 +169,7 @@ function Invoke-MicrowinGetIso {
try {
Write-Host "Mounting Iso. Please wait."
$mountedISO = Mount-DiskImage -PassThru "$filePath"
Write-Host "Done mounting Iso $mountedISO"
Write-Host "Done mounting Iso `"$($mountedISO.ImagePath)`""
$driveLetter = (Get-Volume -DiskImage $mountedISO).DriveLetter
Write-Host "Iso mounted to '$driveLetter'"
} catch {