I ran into an issue with a customer where they were getting an error that the package could not be downloaded. The that they kept showing up in the client logs was 0x80070057. In going over the logs and researching the issue we found that the issue was in that the file path was too long. The deployment was a user based install which adds a lot of characters to the path. The problem is with writing the files to the cache on the client side. The error number 0x80070057 translates to "The parameter is incorrect." Here is a little background on how we get the full path length for the package:
The CM07 client cache directory is specified as:
This is built up from:
<LOGICAL_DRIVE> - the logical drive of the volume where the Cache directory is stored-> <LOGICAL_DRIVE> will be 1 character from A till Z-> 3 characters in total.
<<CCM_CACHE_FOLDER> - the folder where the CM07 Client stores Package Data that was downloaded from DP -> <CCM_CACHE_FOLDER> by default is: Windows\System32\CCM\Cache-> the actual folder may be different from the default, is user configurable-> 28 characters in total: Windows\system32\CCM\cache
<PackageID> - the SMS PackageID-> the PackageID has a fixed size of 8 characters in format + the dot (“.”)-> 9 characters in total: CM70017A.
<Package_Source_Version> - the Source Version Number of the package-> a number between (1 .. xxxx), may be 1 to 4 characters in size + the dot (“.”)-> 5 characters in total: 9999.
<System|(UserSID)> - is either 'System' if package is executed in Local System context OR the Security Identifier (decimal formatted) of the user that downloaded the package source -> System is a fixed size of 6 characters + “\” -> <UserSID> is in decimal format and may be 51 bytes or less in size + “\” -> 7 characters in total when targeting to the system: SYSTEM-> 52 characters maximum when targeting to a user: S-1-5-21-1046319769-833967741-3563887046-8288-> the 52 character maximum is the maximum that a SID can be.
The path length of the CM07 client cache folder is 3 + 28 + 9 + 5 + 53 = 98 characters.
<FolderName|FileName> - a folder or file that makes part of the Package folder structure or files
The maximum allowed path length for the package is the maximum allowed path length for the OS minus the path length of the location of the cache folder.
The maximum allowed path length for the OS is 255 characters.
The maximum allowed path length for the package is 255 - 98 = 157 characters.
Everything above 157 characters in path length on the DP can be a problem for downloading a package to the CM07 client cache. Everything above 167 characters in path length will almost certainly fail with a too long path.