Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to download KB4052623 #224

Open
KrX3D opened this issue Jul 25, 2023 · 1 comment
Open

not able to download KB4052623 #224

KrX3D opened this issue Jul 25, 2023 · 1 comment

Comments

@KrX3D
Copy link

KrX3D commented Jul 25, 2023

hi

i tried to dowload the update with

Save-KbUpdate -Name kb4052623 -Architecture x64-Path C:\Updates

but i always get this warning

WARNUNG: [18:40:51][Save-KbUpdate] Could not find architecture match, downloading all

it saves than 1 file with the name off all 3 files

updateplatform_0456e6719c3ee098af03b785230ac020643fa1ac.exe updateplatform_eaf76728f00b841dc9b3b1722f778e50ed59438a.exe updateplatform_19608225e67d613b65e183e1ca4159bc915cf331.exe

the filesize is 4.57mb.

i also tried it with arm64:

Save-KbUpdate -Name kb4052623 -Architecture arm64 -Path C:\Updates

and also without the Architecture parameter

with the same result. i used arm64 since when i try:

Get-KbUpdate -Name KB4052623

it shows me 9 updates and this is the one i need (which says arm64, but it has 3 links for x64, x86 and arm64)

Title             : Update for Microsoft Defender Antivirus antimalware platform - KB4052623 (Version 4.18.23050.9)
Id                : 4052623
Description       : This package will update Microsoft Defender Antivirus antimalware platform’s components on the
                    user machine.
Architecture      : ARM64
Language          :                                                                                                     Classification    : Definition Updates                                                                                  SupportedProducts : Microsoft Defender Antivirus                                                                        MSRCNumber        :                                                                                                     MSRCSeverity      : n/a
Size              : 26.7 MB
UpdateId          : c9259ee0-f602-4763-b981-bf5924267678
RebootBehavior    : Never restarts
RequestsUserInput : False
ExclusiveInstall  :
NetworkRequired   : False
UninstallNotes    :
UninstallSteps    :
SupersededBy      :
Supersedes        :
LastModified      : 2023-07-24
Link              : {https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/defu/2023/07/updateplatf
                    orm.amd64fre_aa7e29ece94fbaacd94a7f34896b3f9671a18d18.exe, https://catalog.s.download.windowsupdate
                    .com/d/msdownload/update/software/defu/2023/07/updateplatform.arm64fre_705415ef1947972f9102f83c5823
                    0d4d46ce13e2.exe, https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/defu/20
                    23/07/updateplatform.x86fre_551fa7abeaa568a723da710c739577ebf792cd0c.exe}

so am i doing something wrong?

for now i created this script which gets and downloads the x64 file i want, but using one line of code with Save-KbUpdate would be nicer

# Install the 'kbupdate' module if not already present
$moduleName = "kbupdate"
if (-not (Get-Module -ListAvailable | Where-Object { $_.Name -eq $moduleName })) {
    Install-Module -Name $moduleName -Force -Scope CurrentUser -AllowClobber
    Write-Host "Module '$moduleName' installed successfully."
} else {
    Write-Host "Module '$moduleName' is already installed."
}

# Import the 'kbupdate' module
Import-Module $moduleName -ErrorAction Stop

# Get the updates and find the newest version
$updateList = Get-KbUpdate -Name KB4052623
$newestUpdate = $updateList | Sort-Object -Property LastModified -Descending | Select-Object -First 1

if ($newestUpdate) {
    Write-Host "Newest Update:"
    Write-Output $newestUpdate

    # Find the link containing "updateplatform.amd64fre"
    $updateLink = $newestUpdate.Link | Where-Object { $_ -match "updateplatform\.amd64fre" }

    if ($updateLink) {
        Write-Host "Update Link:"
        Write-Output $updateLink

        # Define the download path to the desktop
        $desktopPath = [Environment]::GetFolderPath("Desktop")
        $downloadPath = Join-Path -Path $desktopPath -ChildPath ($updateLink.Split("/")[-1])

        # Download the file to the desktop
        Invoke-WebRequest -Uri $updateLink -OutFile $downloadPath
        Write-Host "File downloaded and saved to: $downloadPath"
    } else {
        Write-Host "Update link containing 'updateplatform.amd64fre' not found."
    }
} else {
    Write-Host "Update not found."
}

@KrX3D
Copy link
Author

KrX3D commented Dec 28, 2024

bump.

doing

PS C:\Windows\System32> $kb = "KB5048292"
PS C:\Windows\System32> $DownloadFolder = "C:\Users\KrX\Desktop\Update"
PS C:\Windows\System32> Save-KbUpdate -Name $kb -Architecture x64 -Path $DownloadFolder

created one file names "windows10.0-kb5048160-x64-ndp48_16a85e7f78e36c3237cfe6f2a565a45c4027464c.msu windows10.0-kb5048161-x64-ndp481_80d0836a9fb32694631d804a208ad1497c9e6adb.msu"

instead of creating 2 seperate files. the one file also has the size of only one, so its overwritten

KrX3D added a commit to KrX3D/kbupdate that referenced this issue Dec 28, 2024
…KB Name

Fix for potatoqualitee#224

When a given -Name parameter corresponds to multiple updates (download links), all files are downloaded to the same filename, causing each subsequent file to overwrite the previous one. Additionally, the resulting filename includes all update names concatenated together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant