SCCM 1902 - Package Distribution Error

Dujon Walsham • 7 June 2019

_wfopen_s() failed with error 2

Issue

When trying to distribute any content on SCCM to your Distribution Points. You may come across certain errors in your Distmgr.log pointing to the content folders in your DataLib folder

Other errors you will also see will be lines such as;

  • RemoveDirectoryW failed (0x80070091)
  • _wfopen_s() failed
  • GetPrivateProfileStringW failed

Can sometimes be quite specific on any INI, INF or DLL files which then can have the following lines included

  • Invalid Content definition (cannot get file time)
  • Invalid Content definition (cannot get attributes)
  • Invalid Content definition (cannot get file hash)
These errors are very similar to if you have an Anti-Virus which would scan on the DPs and stop certain filetypes that are not listed in the exclusions.

Workaround

After looking at the errors it looked to be complaining about very specific files within a package.

Not the actual package name itself, but all files within the content perhaps one or two were flagged.

It looks to be the actual character length of the overall path which goes over the "255" character mark.

I made a copy of the package and changed some of the files around as a test and this was able to distribute successfully.

Not sure if this is a fix which can be done on an OS level, but may cause an issue where packages may have files in much longer paths.

Ensure that 8dot3Name is also enabled on your SCCMContent location aswell to be on the safe side.

by D Walsham 13 December 2021
Looking through the current SQL Server topology and how it affects our decision
by D Walsham 7 October 2021
Introduction
by D Walsham 6 October 2021
Introduction
by D Walsham 12 August 2021
All the parts of the series we went into great detail about how we analyse an end to end solution and how we would design a solution in which would allow us to build endpoints without SCCM being a dependency. Whilst we did this, there is another scenario which we have not touched on yet, which is the hybrid scenarios. In a perfect world ideally you would have your Azure Active Directory within the cloud, every machine meets the recommended requirements for Windows 10, everything is imported into Intune/Autopilot and everyone is happy. But we know this isn't realistic in all cases. Many organisations cannot just simply up and go from on-premise into the cloud therefore the checkpoint here is of course getting into hybrid solutions such as; Co-Management Between Intune and SCCM Hybrid AD with Azure AD and On-Premise AD syncing together These things can play a very interesting part in how you would tackle this if you envisage the next step in the blueprint is to be in a position in which you can build and manage endpoints soley within Intune. With this final part of the series we will go in-depth in how the common hybrid setups look like and how we go about moving into the next step of being able to manage and build devices without SCCM.
by D Walsham 29 July 2021
In continuation from the previous part where we had discussed how we create the "on site" piece of the solution, this was the part which would allow us to get our endpoints into a state in which they would essentially be ready to go through the Autopilot process. Which leaves our next piece of the puzzle, to begin the configuration of the actual backend side that resides within our Endpoint Management console. And you will see how everything ties up together to satisfy the full end to end process of getting an unknown (or known) device to proceed thorough the whole workflow to be finally managed by Intune without the aid of SCCM taking part in any of the prerequisites or preparation at hand.
by D Walsham 15 July 2021
In this part we are now going to look into the technical step by step points on how we put everything together. In the previous part we spoke about the structure of how we would asses whether a machine was actually ready to be built with Autopilot or not with a build checklist process which would step through all areas which would cover an endpoints eligibility. Now with everything planned out we finally want to step into making things reality by putting everything together.
by D Walsham 2 July 2021
When it comes to managing your endpoints in endpoint manager, one of the things you may be looking to do is to get all of your Intune registered machines to also be enrolled as Autopilot devices. Now we can of course just have the deployment profile deployed to all machines and then hit the "Convert targeted machines to autopilot" but this might not necessarily be feasible for every client. We may want to perform some due diligence first so we can at least understand what devices in Intune are not in Autopilot.
Show More