What's the meaning of "NoWorkingDirectory" string value in Windows Registry?

Solution 1:

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.

http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.workingdirectory%28v=vs.110%29.aspx

Solution 2:

The "NoWorkingDirectory" verb property is undocumented so this is just a guess:

Cmd.exe does not support remote shares (UNC) as the current directory and if you start Cmd.exe with such a working directory it will print a warning message to the console.

If you look at the "Open command window here" registration you will see that it starts Cmd.exe with the pushd command and pushd does support UNC paths. NoWorkingDirectory is just there to avoid displaying a warning message.

It is not really required for PowerShell.