Intune & Endpoint

Intunewin file packaging: the errors and what causes them

The Content Prep Tool validates almost nothing. The errors it emits, what causes them, and the regression that reports success and produces no file.

Intunewin file packaging: the errors and what causes them. Intune & Endpoint article banner on grbadhon.com

An intunewin file is not an archive you can open. It is an encrypted payload and a plaintext metadata file, produced by the Microsoft Win32 Content Prep Tool, and when the tool refuses to produce one it tells you almost nothing about why. This post covers the errors it emits, what actually causes them, and a regression that breaks automation while reporting success.

The difficulty is not the packaging. It is that the tool is documented in two places that disagree, and the commonest cause of failure appears in neither of them. The Learn article lists five parameters; the repository Microsoft ships the tool from lists eight. If you are working a broader symptom than a failed build, start from the layer an Intune app failure actually sits in. Every Microsoft fact below was verified against Microsoft Learn and Microsoft’s own repository on 24 October 2026.

What the tool does, and what it does not check

The Content Prep Tool takes a folder, compresses everything in it, encrypts the result, and writes a wrapper holding that payload plus a metadata file. Three parameters carry the work. -c is the folder that gets compressed, -s is the installer inside it that the package will invoke, and -o is where the output lands. Microsoft documents the behaviour of -s for a Windows Installer package as retrieving the information Intune requires, which is why an MSI arrives in the portal with its product code and version already populated. For an EXE, the Learn article on preparing Win32 content says nothing, and nothing is what happens.

Two instructions on that page are worth following literally. First, keep the tool separate from the installer files and folders, so the tool itself is not compressed into the output. Second, put any file you need to reference into a subfolder of the setup folder and reference it with a relative path. Both exist because -c is indiscriminate: it takes the whole folder, including the tool binary you left sitting in it and the version control directory you forgot about.

package-app.ps1
# Package an installer whose file name contains no spaces.
# The -s path must point at a file that sits inside the -c folder.
IntuneWinAppUtil.exe -c C:\Packages\7zip\source -s C:\Packages\7zip\source\7z2501-x64.msi -o C:\Packages\7zip\out -q

What the tool does not check is almost everything else. It does not verify that the installer runs silently, although Microsoft requires it: Win32 apps deployed through Intune must install without user interaction. It does not test the output against the 30 GB per app ceiling. And it does not validate the detection rules, because detection rules are not in the package at all. That last point is the most common misunderstanding about what an intunewin file contains, and it accounts for a great deal of wasted repackaging.

The parameters Learn does not list

Two current Microsoft sources document different parameter sets for the same binary, and neither acknowledges the other. The Learn article lists -h, -c, -s, -o and -q. The README in Microsoft’s own Win32 Content Prep Tool repository lists those five and three more, plus a prerequisite the Learn page omits.

parameters.txt
-h                  help
-v                  tool version, 1.8.2 and later only
-c SETUP_FOLDER     everything in this folder is compressed into the package
-s SETUP_FILE       the installer the package will invoke
-o OUTPUT_FOLDER    where the .intunewin file is written
-a CATALOG_FOLDER   catalog files, for Windows 10 in S mode
-q                  quiet mode, existing output is overwritten
-qq                 quiet mode with no console output at all
ItemOn LearnIn the repository README
-a, catalog folder for Windows 10 in S modeAbsentDocumented
-v, print the tool versionAbsentDocumented, 1.8.2 and later
-qq, quiet with no console outputAbsentDocumented
.NET Framework 4.7.2 prerequisiteAbsentListed as a prerequisite
Current versionNot stated1.8.7

The -a omission is the one that costs something. Catalog files are how a Win32 installer is admitted on Windows 10 in S mode, and an administrator working only from Learn would reasonably conclude the tool cannot produce them. Naming the inconsistency rather than quietly choosing a side is the honest position: both sources are current, both return HTTP 200 today, and the repository is the more complete of the two.

The error that stops most intunewin file builds

One message accounts for more failed builds than everything else put together.

ERROR: The setup file you specified cannot be accessed.

It reads like a permissions fault or a bad path, and it is usually neither. On a Microsoft Q and A thread about this exact error, a user hit it on three separate machines using local paths with full rights. A Microsoft support engineer identified the cause: the installer file name contained spaces. Renaming the file to remove them resolved it, and the reporter confirmed the fix.

This appears in neither the Learn article nor the repository README. There is no note about spaces, no quoting guidance for -s, and nothing to suggest the file name is parsed differently from the folder path that contains it. The practical response is not to remember the fix but to remove the condition: rename installers to a space free form as a packaging step, every time, before the tool ever runs.

A second cause produces the same line. The -s file must sit inside the -c folder. The worked example on Learn shows that, with both paths under the same directory, but the rule is stated nowhere, and pointing -s at a staging folder alongside the source folder fails with the identical message.

The newsletter

Free PDF: the Intune troubleshooting field guide

Subscribe and get the free 8-page Intune troubleshooting field guide (PDF), then new fixes about twice a month. From a Microsoft MVP.

Free. Confirm by email, unsubscribe in one click. Privacy.

The failure modes

What you seeWhat it usually means
ERROR: The setup file you specified cannot be accessedSpaces in the installer file name, or -s pointing at a file outside the -c folder
The package is far larger than the installer-c compressed the whole folder, tool binary and version control directory included
Exit code 0, and the caller cannot find an output fileThe visible console regression introduced in version 1.8.5
Upload rejected on sizeThe package exceeds 30 GB, which is the per app ceiling
App installs correctly and still reports FailedDetection rules, which are configured in the portal and are not in the package

Only the first two are packaging problems. The third is a tooling regression, covered next. The last two sit on the Intune side of the boundary, and that is where the time goes: an administrator who has just produced a valid intunewin file keeps examining the package long after the problem has moved on to why a Win32 app installs and still reports Failed.

The regression that quietly breaks pipelines

From version 1.8.5, the tool requires a visible console window. Microsoft’s issue tracker carries it under the title IntuneWinAppUtil.exe cannot be launched from c# code without console visible, with a stack trace landing in a call that reads the console buffer. Version 1.8.4 is reported as unaffected. The repository currently ships 1.8.7, and I have found no statement either way on whether the behaviour was corrected, so treat it as present until you have tested the version you are actually running.

The failure shape is what makes this worth a section rather than a footnote. The tool returns exit code 0. A wrapper that launched it with no window and redirected output therefore records a success, and then cannot find the file. The MSEndpointMgr IntuneWin32App module reports precisely that, as a warning that it cannot detect the expected intunewin file after invocation, on a run whose logged exit code is 0; the remedies in that thread are to launch the tool as an ordinary visible process, or to pin an older binary. Any build agent, scheduled task or service account that packages applications is exposed to this, and the return code will not tell you.

If you automate packaging, pin the tool version and assert that the output file exists rather than trusting the exit code. A zero exit code concealing a failure recurs across the Intune tooling, and it is worth recognising as a class of problem rather than an incident.

What I would do differently

I would stop treating the package as the interesting artefact. Nearly everything an administrator tunes, the install command, the uninstall command, detection rules, requirement rules and return code mapping, is configured in the portal and is not in the intunewin file. The package is a compressed, encrypted folder with a manifest attached. Rebuilding it to change a detection rule is work that buys nothing.

I would also version the source folder rather than the output. The folder is readable, diffable and reviewable. The package is not, because the payload is encrypted and only the metadata is legible. Keeping the source under version control and generating the package as a build step means the artefact you can audit is the artefact you keep.

I have not run this across a device fleet, and my own tenant is a lab, so the figures and behaviours above come from the Microsoft sources named rather than from production telemetry. Where I would expect this to bite hardest is automation rather than interactive work: a person packaging an app in a console session will never meet the 1.8.5 regression, and a build agent will meet it on the first run and call it a success.

For the device side of the picture, the management extension is what downloads and decrypts the content, and the log to read for app activity is not the one most older guides name.

Last verified: 24 October 2026.

Common questions

Most often because the installer file name contains spaces. A Microsoft support engineer identified that cause on Microsoft Q and A, after the reporter hit the error on three separate machines using local paths with full rights. Rename the file to a space free form. The same message also appears when the -s file sits outside the -c folder.

Only partly. The outer wrapper opens and its metadata is readable, but the payload inside is encrypted and does not open the same way. That is the practical reason to keep the source folder, rather than the package, under version control and to review that folder before a release.

In the Intune portal, on the app you create, not in the package. The Content Prep Tool records which installer the package invokes, but the command lines, detection rules, requirement rules and return code mapping are all configured after upload. Changing any of them needs no repackaging at all.

From version 1.8.5 the tool requires a visible console window. Launched from code with no window and redirected output, it returns exit code 0 and the caller cannot find the output file. Pin a known good version, launch it as an ordinary visible process, and assert the file exists rather than trusting the exit code.

Microsoft caps Windows application size at 30 GB per app, stated on both the Win32 app management page and the article on preparing content for upload. The Content Prep Tool does not test its output against that ceiling, so an oversized package builds without complaint and is rejected later, at upload.

Microsoft repository lists .NET Framework 4.7.2 as a prerequisite for the Content Prep Tool. The Learn article does not mention a .NET requirement at all, which is one of several points where the two current sources differ. On a clean build agent, install it before the first packaging run.

The newsletter

Free: the Intune troubleshooting field guide

Subscribe and get my 8-page PDF: 13 common Intune problems, the order to check them in, and the fix for each. Then Microsoft 365 fixes from the field, about twice a month. From G.R Badhon, Microsoft MVP.

  • The field guide, sent the moment you confirm
  • New Intune, Entra ID and Purview guides as they publish
  • One field-tested fix or script per issue

Free. Confirm by email, unsubscribe in one click. Privacy.