CreateProcess failed. Code(0x80070002) in ConfigMgr OSD

Here’s a handy tip if you get the following errors in your OSD build

CreateProcess failed. Code(0x80070002)

Command line execution failed (80070002)

Failed to execute command line '' . 
The system cannot find the file specified. (Error: 80070002; Source: Windows)

Basically this error is occurring when using a ‘Run Command Line’ step in the Task Sequence.

The command you are attempting to executed needs to start with cmd /c to run successfully.

One comment

  1. Thank you, this worked for me. Any idea why this is? We recently moved from SCCM 2012 to the current branch, and there are a number Run Command Line tasks that worked fine before but now fail until cmd /c is added. Some other command lines still work without being modified, so clearly something has changed with how these Run Command Line tasks are being processed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s