Archive

Open PowerShell Prompt Here

2008-02-17 10:57:13 by Kjell-Åke Gafvelin

I've been using PowerShell for a while now but it still hasn't replaced the command prompt for me yet. I have been using the "Command Prompt Here" Power Toy a lot to make it easier to open up a command prompt at a specific location from the explorer. So now I added some settings to the registry that will do the same but with PowerShell instead.

Here is the registry script for making such an entry in explorer:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\PowerShell]
@="Open PowerShell Prompt Here"

[HKEY_CLASSES_ROOT\Directory\shell\PowerShell\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoExit -Command [Environment]::CurrentDirectory=(Set-Location -LiteralPath:'%L' -PassThru).ProviderPath\""

|