Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using this small script from here to append an entry to opening PowerShell from the context menu when clicking on a folder.

However, I'd like to change its behaviour in order to open the PowerShell from within a directory. Is this possible?

Regards

share|improve this question
    
You might not be able to use this solution verbatim, but maybe it will help? stackoverflow.com/questions/4451668/… –  FrustratedWithFormsDesigner Apr 5 '12 at 14:07
    
Thanks for your comment but I do not see how a linux related question might help me here? –  orschiro Apr 5 '12 at 17:38
1  
You didn't read the question very carefully. The question was about how to reproduce behaviour from a linux environment (a button click that opened a new terminal window in the directory that the button was clicked on) in a Windows environment. I think this solution: stackoverflow.com/a/4461768/192801 is actually closer to what you want. –  FrustratedWithFormsDesigner Apr 5 '12 at 18:04
    
At least you can open a CMD "here". In Vista and Windows 7, you'll get that option if you hold down shift and right-click (this is built in). Does anybody know how this might be changed to use the PowerShell instead? –  orschiro Jun 2 '12 at 10:31
1  
The technique is to find Cmdhere in the Registry. Then add PowerShelHere and wire-up in the same way as Cmdhere. I started at: HKEY_CLASSES_ROOT\Directory\shell –  Guy Thomas Aug 6 '12 at 16:42
add comment

1 Answer 1

up vote 2 down vote accepted

Blatantly stealing from http://ss64.com/ps/syntax-openhere.html, you basically need to save the following to a text file with an extension of .reg, double click to run it and confirm the input. Now when you right click on a directory, you will have an option for "PowerShell Here".

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\PSOpenHere]
@="PowerShell Here"
[HKEY_CLASSES_ROOT\Directory\shell\PSOpenHere\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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