## Error message
```text
Error 0x80070002: The system cannot find the file specified.
```

## TL;DR
On an enrolled device, 80070002 from Intune means a deployed app or script referenced something missing. Find the failed deployment in Intune, check the client-side log for the exact missing path, fix the package or script, and retry the install.

## Steps
1. In Intune, open the device's managed apps or device configuration status and find the failed item.
   Expected: The failed deployment is named with the 80070002 code.
2. On the device, check the Intune management extension log for the missing file or path.
   Expected: The log quotes the exact path that was not found.
3. Fix the installer, script, or detection rule so every referenced path exists in the package.
   Expected: The package passes a local test install.
4. Retry the deployment from Intune and confirm success.
   Expected: The deployment reports succeeded.

## When to use
- The code appears in Intune deployment status on enrolled devices
- A win32 app or PowerShell script deployment fails repeatedly
- The failure follows a package update

## When not to use
- The device is mid-Autopilot enrollment (use the Autopilot 80070002 flow)
- The code appears in Windows Update (different subsystem)
- The app was never assigned to the device (check targeting first)

## Why this happens
Intune executes whatever the package declares; if a script, installer, or detection rule names a file that is not in the delivered payload, Windows returns 80070002 and Intune surfaces it as the deployment failure. Package updates are the usual moment a path goes stale.

## Edge cases
- Scripts that download payloads at runtime fail this way when the download URL breaks; the log shows the download step.
- Detection rules run after install, so a bad rule can fail an app that actually installed fine.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_WfAkwRlyv8-PYRZMQ-l4Wg
