Empty "NoWorkingDirectory" string value is often used in Windows Registry when user-defined Right-Click menu items are created. For example to be able to open PowerShell when right-clicking on folder backround in Windows Explorer (as opposed to right-clicking on folder itself, in that case "NoWorkingDirectory" is not used):

@="Open PowerShell Here"

@="C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"

However, I am not clear on actual purpose of this value. It is always used empty in all samples I found. What exactly does it signify?

  • I would imagine if there was a directory value it would only work in that directory. Do you have other examples? – Ramhound Jan 17 '14 at 20:48
  • windows7home.net/… – Joe Schmoe Jan 17 '14 at 20:53
  • My guess is that it's the folder used to execute from if there's no Working Folder provided when the shell command is called (similar to the "Start In:" option in a Shortcut's properties). When empty it probably assumes the current folder. But again, this is just guessing. ;) – Ƭᴇcʜιᴇ007 Jan 17 '14 at 21:47

WorkingDirectory is a property of the System.Diagnostics.ProcessStartInfo, when you Right Click, you are starting a new process and this setting allows you to start a process without the current directory becoming the "Working Directory". It then defaults to the System32 for the command being run.

So you would use "NoWorkingDirectory" when you are not wanting the location right clicked to become part of the environmental path for the duration of the script. Useless setting in 90% of cases, unless you have similar named files in multiple path locations which could get sticky unless "NoWorkingDirectory" is specified.

See more details here.


  • For instance, if I have a copy of DISM in a folder and right click on it, "NoWorkingDirectory" would allow me to access the copy in System32 over the one in the directory I right clicked on. See, it's kinda useless because more often than not I want the copy in the folder I clicked on. – Knuckle-Dragger Jan 21 '14 at 13:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.