| Previous | Next |
| STATUS_LOCAL_USER_SESSION_KEY | STATUS_SERIAL_MORE_WRITES |
STATUS_BAD_CURRENT_DIRECTORY
The startup current directory is part of process creation state
STATUS_BAD_CURRENT_DIRECTORY identifies a failure to switch a process to the current directory requested for startup. A process current directory is more than a display string: relative paths are resolved against it. CreateProcessW accepts an explicit lpCurrentDirectory; when it is NULL, the child inherits the parent current directory.
The failure should therefore be investigated at process creation or compatibility startup, not by testing the executable path alone. The executable can exist and load while the requested working directory has been deleted, disconnected, become inaccessible, or refers to a path representation the startup environment cannot use. The NTSTATUS message also reflects a legacy interactive recovery path that could substitute another directory or exit.
Capture the exact startup current-directory string before environment expansion or wrapper rewriting. Compare it with the parent process current directory and the value passed to process creation. Test directory access under the same token and session, and check mapped-drive or network-path lifetime when relevant. Do not silently replace the directory with the executable directory unless that is the application contract: doing so changes every relative file lookup and can produce subtler configuration or data-placement failures.
What to inspect
- Log the exact
lpCurrentDirectoryvalue and whether the child was expected to inherit it. - Test the directory under the same security token and session that creates the process.
- After fallback, audit relative-path behavior because changing the current directory changes file resolution.
References
Looking for a different code? Search another status or error code.
