Forum Discussion

81alex's avatar
81alex
Copper Contributor
Oct 21, 2026

Appx volume still offline after restoring failed HDD to NVMe — PackageVolume.Repair fails 0x80070490

My 1 TB HDD failed. It hosted D:, including my Codex local workspace. I imaged what I could recover, rebuilt D: on an NVMe partition, restored the files and checked the hashes. The files are accessible, but Windows still marks the existing D:\WindowsApps Appx volume offline. C: and G: are online.

The old volume name resolves to D:, but the Appx record’s stored MediaId differs from the current storage ID. Both Mount-AppxVolume and PackageVolume.Repair() fail with 0x80070490 (“Element not found”).

Microsoft’s https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.management.deployment.packagevolume.repair describes backing up a drive, replacing it, and restoring the contents when the new drive has a different media ID. That sounds like my situation, but Repair itself fails. What specific diagnostic would show what it cannot find, or is there a supported way to reconnect the existing package volume?

I need to preserve the existing app registrations and original user data. I have a backup and more detailed diagnostics if something specific would help.

Windows: Windows 11 Pro, 64-bit, [enter version and OS build from winver]

Get-AppxVolume shows:

Name: \\?\Volume{c236dfe0-118d-01dd-f06f-1be1c688ee00} PackageStorePath: D:\WindowsApps IsOffline: True

A separate read-only diagnostic found:

Stored MediaId: {20202020-5720-2D44-7335-CDAC60868D70} Current storage ID: {30303030-305F-3030-7335-CDAC60868D70}

1 Reply

  • Your restored files are readable, but the package volume still refers to the old disk identity. Microsoft's Repair documentation explicitly covers replacement drives with changed media IDs, so restoring the drive letter and file hashes alone does not restore that association.

     

    First record the actual Windows build and Windows App SDK version. In an elevated diagnostic program, resolve the volume with PackageVolume.FindPackageVolumeByPath using the package-store path and record IsRepairNeeded, the returned volume identity and the complete exception details. Repair requires administrator privileges.

     

    For a reproducible failure, capture a short Microsoft Process Monitor trace around the operation, retaining filesystem and registry events and their stacks. Examine relevant failed lookups, but do not treat every NAME NOT FOUND event as causal. Preserve the original image and registrations. I cannot identify the missing element from that HRESULT alone; give Microsoft support the trace and both media IDs before manually altering package-volume metadata.