If an Intune Win32 app fails with The system cannot find the file specified. (0x80070002), find the failed command and the file it tried to open. Compare that command with the files actually included in the app package, then check the account and process context that ran it. A Company Portal error alone doesn't establish whether the installer failed to launch, a script couldn't find a companion file, or detection failed after installation.

I'd preserve the failed attempt before editing the app. That gives you a command, timestamp and package version to compare with the retry. If you're the PC user, record the app name, full error and failure time for IT; the package changes below belong to the deployment administrator.

Confirm this is an Intune Win32 app failure

In the Intune admin center, confirm the affected deployment is a Windows app (Win32). Keep its installed or intended version and the affected device with the error. Microsoft's system error reference defines ERROR_FILE_NOT_FOUND, code 2, as “The system cannot find the file specified.” The message names a condition, not the missing file or the repair.

If the error appears while installing a Windows update, use the Windows Update 0x80070002 checks. If the failed process is CCMSetup, follow the Configuration Manager client setup logs. A Software Center operating-system upgrade belongs to the task-sequence and Windows Setup investigation. Those operations need different evidence.

Save the attempt and the right Intune logs

The administrator can open Troubleshoot + support > Select user, choose the affected user, select the device, then open Managed Apps and the failed app. Microsoft's app troubleshooting instructions describe this route. Record the complete installation status and time, not just a cropped error number.

Before another attempt, preserve the available agent logs from C:\ProgramData\Microsoft\IntuneManagementExtension\Logs through your approved support process. Microsoft's current Win32 troubleshooting log reference distinguishes these roles:

  • AppWorkload.log: app check-ins, installation, applicability and detection activity. Start with the failed app and matching attempt.
  • AppActionProcessor.log: application action processing, including detection and applicability checks.
  • IntuneManagementExtension.log: agent check-in, policy processing and reporting. Keep it with the app logs when tracing the deployment.
  • AgentExecutor.log: PowerShell script execution details, when a script is involved.

Keep the surrounding lines and any installer or wrapper log the attempt identifies. A code from yesterday's app evaluation can mislead you about today's installation. Retain complete logs privately for authorized support; remove user, tenant, device and app identifiers, addresses and secrets from public excerpts.

If IT needs remote collection, the failed app's Installation details pane can offer Collect diagnostics. Microsoft's Win32 diagnostic collection steps require complete file paths with log filenames; after collection, use Download diagnostics. Collecting diagnostics doesn't repair the app.

Find the failed stage before editing the package

Read the matching attempt in order. Locate the download or extraction activity, the launch command, any child installer or script result, and detection. Follow the first specific failure that identifies a file or action:

  • Content wasn't obtained or extracted: give the deployment owner that content-stage failure. Don't infer successful delivery from 0x80070002 alone.
  • The installer couldn't start: compare the logged executable and arguments with the packaged files and Program settings.
  • The installer or script started, then couldn't find a file: inspect the named child operation, working path and companion file. A launch-command typo may be irrelevant at this stage.
  • Installation completed but detection failed: verify the installed app and detection rule separately before reinstalling it.

Keep a dependency's failure attached to that dependency. Editing the parent app's command won't identify a missing file in a different installer. If the record doesn't show which stage failed, collect the missing context before changing the package.

Compare the Program command with the packaged files

Save the current app settings and source package before editing. Open Apps > All Apps, select the app, then Properties > Program > Edit. Check the installer type first. Microsoft's Program settings support a command line or an uploaded PowerShell installer script; don't assume every app uses a command-line wrapper.

For a command-line installer, compare the complete logged command with Install command. Check the executable's exact filename and extension, its path relative to the packaged source, quoting around paths containing spaces, and the arguments that this vendor's installer supports. A silent switch copied from another app can be wrong even when its executable exists.

In a September 2023 deployment example, the published log shows downloaded and extracted content followed by setup.ex /sAll. The author identifies the misspelled executable in Program settings. That log supports a command mismatch for that attempt; it doesn't establish that all missing-file errors occur after a successful download.

Intune Program install-command field showing the reported setup.ex /sAll filename typo
The reported command contains setup.ex. Compare the name with your actual package; /sAll is specific to that installer. Enlarge the install-command example.

A January 2026 Intune example reports an omitted .exe extension in a Notepad++ command. Use the full intended filename when reviewing your package, but confirm the actual launch failure rather than assuming an omitted extension always produces this code. The two reports support checking the command against the package, not replacing every install command with one sample.

If the command is already correct, stop editing it. Follow the specific file named by the child installer or wrapper. Don't reclassify its failure return code as success to clear the portal status.

Check companion files and runtime context

Inspect the exact source used to build the deployed package. Microsoft's Win32 Content Prep guidance says the tool includes files and subfolders from the setup folder. Required scripts, transforms, configuration files and other companion content must be in that source tree. A file elsewhere on the packager's PC doesn't become part of the deployment.

Use relative paths to packaged companion files where the installer or script expects them. Microsoft's example places a license in a licenses subfolder and references licenses\license.txt. Check the wrapper's own working-directory assumptions too: a relative path is only useful when the process resolves it from the intended location.

When the source is incomplete, have the packaging owner restore the approved files, rebuild the package and confirm which content revision is deployed. Keep the prep tool outside the source folder so it isn't included as app content; use a separate output folder as in Microsoft's packaging example. Don't replace executables with files from download sites or delete the endpoint cache to compensate for an incomplete source.

Next compare Install behavior, the script's paths and the execution context. Intune supports System and User installation contexts. A script that finds a file in the signed-in administrator's profile doesn't prove it can find it under the app's configured account. Ask the deployment owner to verify access to the named file in that intended context, including any network path, rather than changing every deployment to System.

For command-line fields that call powershell.exe, Microsoft's Program reference says the call launches 32-bit PowerShell; it documents %SystemRoot%\Sysnative\WindowsPowerShell\v1.0\powershell.exe to request 64-bit execution on 64-bit Windows. Check that distinction when the failed path depends on process architecture. It isn't a command to paste into every app, and uploaded installer scripts have their own settings. Keep the organization's signing, permissions and endpoint protection requirements intact.

Separate installation from detection

First check whether the intended app and version were installed for the intended user or device. Then compare that state with Detection rules. Microsoft's detection-rule reference supports MSI, file, registry and custom-script rules. All configured detection conditions must be met; one matching file doesn't cancel another failed rule.

Check the rule's path, version or product identity against this package, plus its 32-bit or 64-bit setting where applicable. For a custom detection script, Intune requires a zero exit code and a string on standard output to detect the app. The same reference says output on standard error makes detection evaluate as not installed even with a zero exit code and standard output. “The script finished” isn't enough.

A June 2023 Greenshot deployment question includes a winget-based detection script and a missing-file error. The replies ask whether the app is installed and suggest checking the executable path and logs; the question doesn't confirm a fix. I'd answer that installation question before changing detection. Comparing an installed version with the latest version on a remote site can also answer a different question from whether this assigned package is present. You don't need to adopt winget or install a newer remote release to diagnose a missing file in your assigned package.

Correct a detection rule only when its evidence is wrong. Don't weaken the rule, print a success string unconditionally or remove a version check just to turn a failure green. If an app isn't installed, a permissive detection result would hide the deployment problem.

Retry once and verify both results

After the deployment owner approves the identified correction, validate it on an approved pilot device or deployment group before a wider rollout. Retry through the normal managed deployment process and retain the new logs. Compare the same failed stage with the preserved attempt. Confirm the intended installer completes, the expected app version is present, detection matches that state and the management report reflects the new attempt.

Have the intended user open the app and check the function they need. A successful manual install under a different account, a sync alone or a vanished error notification doesn't establish that the managed deployment now works. If the same file failure returns, stop repeating retries and escalate that command and path with both log sets.

Give IT the app and content revision, device and Windows version, failure time, configured installer type and context, exact failed command or script operation, named missing file, installer result, detection rule and approved changes. Keep full commands and logs in the authorized support channel. The system repair hub covers other failure stages once the evidence identifies a different Windows operation.