4
1
I just created myself an "Open PowerShell Here" context menu item by adding the "shell", "powershell" and "command" keys to the appropriate place in the Windows registry. The default value of "command" was the path to my powershell.exe by use of the backslash as an escape character, instead of enclosing the entire path in double quotes.
This resulted in a cmd windows being open with powershell executed, i.e. the window was small, black and otherwise formatted by the default Command Prompt style.
When I changed the path to have no backslashes as escape characters, but instead enclosing the entire path in double quotes, without making any other change, what so ever, a normal, bigger, blue powershell window opened, instead.
I am wondering what change do double quotes bring to the registry? How do they alter the execution in this case and why?
The keys in question are:
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe
and
"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe"
The first key will open a standard black Command Prompt window with PowerShell started, while the second opens the familiar blue "PowerShell" window.
Note that the key to start Powershell in a specific folder has arguments at the end, which are purposely omitted here, as these are the keys that I tested with and that give different results.
1Please [edit] your question to include both command keys. – DavidPostill – 2015-11-13T15:42:17.350