0x80070002: The system cannot find the file specified
Windows could not find a file. In SCCM the install command usually names a file that is not in the content, or the content never reached the client.
What 0x80070002 means
0x80070002 means "The system cannot find the file specified". A program asked for a file by name and Windows could not find it.
You see it in Software Center on a failed install and in the console under Monitoring > Deployments. On the client, check AppEnforce.log for applications and execmgr.log for packages. In a task sequence, check smsts.log.
Common causes
- The install command names a file that is not in the content source folder, or the name has a typo.
- The command starts a program that is not on the path for the SYSTEM account.
- The content on the distribution point is old, so a new file is missing from the client cache.
- The install runs as a 32-bit process and looks in the wrong System32 or Program Files folder.
- A script uses a relative path, but the working folder is not the one it expects.
How to fix 0x80070002
-
Compare the command line with the content
Open
AppEnforce.logand find the command line that ran. Note the working folder. It is a folder underC:\Windows\ccmcache.Open that cache folder on the client. Check that every file named in the command is there, with the same spelling and the same subfolder.
-
Update the content on the distribution points
If a file is missing from the cache, check the source folder first. Then, in the console, select the deployment type and choose Update Content. For a package, choose Update Distribution Points.
Wait for the content status to turn green under Monitoring > Distribution Status > Content Status. Then retry the install.
-
Use full paths for programs outside the content
If the command calls a tool such as
powershell.exeorcscript.exe, it normally resolves from System32. If it calls anything else, write the full path.In scripts, build paths from the script folder. Do not rely on the current folder.
-
Check the 32-bit setting
Open the deployment type and go to the Program tab. Look at "Run installation and uninstall program as 32-bit process on 64-bit clients". A 32-bit process sees
C:\Windows\SysWOW64when it asks for System32. Clear the box if the installer needs the 64-bit folders.
Commands that help
Get-ChildItem C:\Windows\ccmcache -Directory |
Sort-Object LastWriteTime -Descending |
Select-Object -First 10 Name, LastWriteTime
Turn any hex or decimal error code into its meaning, or search every code on this site.