It was only a matter of time, right?

Due to my recent infatuation passionate love affair with PowerShell (whose download has been up and down on MSDN today...not sure why) I realized that I was missing something - the same behavior that I'd gotten hooked on with Visual Studio's Command Prompt/Batch File and "Visual Studio 2003/5 Command Prompt Here.

I really think it's intuitive to right-click on a folder and say "Command Prompt Here" so here's "PowerShell Prompt Here."

Download the INF, right click and select "Install." It appears in Add/Remove programs but for some reason doesn't completely uninstall. If you want to uninstall completely, search the registry for "PowerShellHere" (oneword) and delete the two trees you find.

Enjoy. Note, if you've installed your PowerShell to another folder other than the default, you'll need to edit the file manually with your path.

Disclaimer, Your Mileage May Vary (YMMV), Good Luck, Don't Player Hate, Integrate. If you've got improvements to the INF, post them in the comments and I'll update the file.

File Attachment: powershellhere.inf (1 KB)

 

只要我们记住,Windows在上下文菜单上有一个隐藏的“在这里打开命令窗口”选项,但谁使用命令提示符这些天?

如何添加“在这里打开PowerShell”到Windows中的上下文菜单

按Win + R组合键打开运行对话框,然后输入regedit并按回车。

注册表编辑器打开后,导航到:

HKEY_CLASSES_ROOT\Directory\shell

在这里,您需要右键单击shell子键,并创建一个名为“powershell”的新键。

一旦创建了键,您需要修改其默认值,这可以通过右键单击上下文菜单完成。

在值数据字段文本框中,键入“打开PowerShell这里”,这是我们要添加到Windows上下文菜单的文本。

现在右键单击右侧的空白区域,创建一个新的键并调用它的命令。

然后右键单击命令键的默认值,并选择修改它。

这一次,我们必须把它设置为特殊的东西。 如果您的Windows版本安装在不同的目录中,或者您使用的是不同版本的powershell,则需要调整这些值。 重要的是,你使用双斜杠和添加额外的东西在结束。

C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath %L

这就是它的全部。

如何添加“在这里打开PowerShell”到Windows中的上下文菜单的更多相关文章

  1. win10 右键添加“在此打开powershell”

    计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\ 上图中的字符串,直接去下图中的位置复制过来就好

  2. win10右键添加在此处打开powershell

    如图: 你想要的效果可能就是这个吧?但是找了好久没有找到方法?爸比告诉你,不需要修改任何东西, 解锁新姿势: 在文件夹空白处,按住shift同时鼠标右击,发现没??发现没!!!!

  3. django项目添加路由----返回给客户端内容-----windows中的python

    django项目添加路由 url函数的第一个参数是匹配url路径的正则表达式,第2个参数是路由函数 第一个正则表达式是r'^$',其中r表示正则表达式字符串不对转义符进行转义.“^”表示匹配URL路径 ...

  4. Windows10文件目录下添加 Shift+右键打开管理员Powershell窗口

    背景(可略过) 目前在调试 Python 程序,遇到了一个问题:当程序中包含多线程时,使用 IDLE 运行是不会执行多线程的语句的,在网上一顿搜罗了解到这种情况可以换成在命令行下执行.好像用 PyCh ...

  5. Windows 右键添加「cmd 打开」

    1. 2. 3. 参考: 1.Windows右键添加"使用CMD打开" 2.WIN7.WIN8 右键在目录当前打开命令行Cmd窗口(图文)

  6. Windows之文件夹中打开PowerShell

    Windows之文件夹中打开PowerShell 为了解决Windows中在某个路径下使用PowerShell,而不是使用传统的cd命令切换过去,具体做法如下: 方法一 打开文件夹 在文件夹的内容区按 ...

  7. Windows10右键添加“在此处打开命令窗口"

    今天跑代码时用到了Powershell,有一个环境变量死活都找不到,无奈只好重新回到cmd命令行测试,结果立马就跑通了.-_-||  由于现在Win10默认右键只有Powershell,所以为了以后方 ...

  8. 无法打开包括文件:“windows.h”: No such file or directory

      VS2012 出现如下错误: 无法打开包括文件:"windows.h": No such file or directory   解决办法,将 C:\Program Files ...

  9. 为Windows资源管理器右键菜单添加菜单项

    为Windows资源管理器右键菜单添加菜单项 在Windows下命令行用的比较多,经常在资源管理器里翻到某个目录,若想要在此目录下跑命令,只能是打开cmd.exe,然后一路cd才能到达此目录. 每次都 ...

随机推荐

  1. LeetCode(65)-Power of Four

    题目: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example ...

  2. LeetCode(39)-Intersection of Two Linked Lists

    听歌曲初爱有感: 开头啰嗦两句,刚在做算法题目的时候,听到了杨宗纬的<初爱>,突然有了一种本科时候的感觉,想想自己现在研二了,青春喂了狗,我果断喝了一罐啤酒,循环这首歌到吐-.. 题目: ...

  3. javascript算术运算溢出

    js中的算术在溢出overflow,下溢underflow或被0整除时不会报错. 当数字结果超过了数字上限时,结果为一个特殊的无穷大(infinity)值,在js中以Infinity表示:同理,当负数 ...

  4. svn 不能添加.a文件

    1.打开终端输入    open ~/.subversion/ 2.双击打开config文件 3.修改如下两行 # global-ignores = *.o *.lo *.la *.al .libs ...

  5. 8.2 Query 语句优化基本思路和原则

    在分析如何优化MySQL Query 之前,我们需要先了解一下Query 语句优化的基本思路和原则.一般来说,Query 语句的优化思路和原则主要提现在以下几个方面: 1. 优化更需要优化的Query ...

  6. AngularJs 隔离作用域

    初学NG,有诸多的不解,今天看了一篇文章,原文地址:https://segmentfault.com/a/1190000002773689#articleHeader0 ,本文运行的代码也出处此. 里 ...

  7. Spring Security简明实践及相关国际化处理

    别人的都是最佳实践,因为我目前的设置没有按照参考文档推荐,还是采用DelegatingFilterProxy,所以我只能说简明实践.先贴我的applicationContext-security.xm ...

  8. 移动 Web 的用户界面设计

    http://www.ibm.com/developerworks/cn/mobile/wa-interface/index.html 简介 在创新者试图探索新的可能性的同时,新兴技术也在经历快速变化 ...

  9. svn Server sent unexpected return value (403 Forbidden) in response to CHECKOUT

    今天,提交資料到公司svn服務器,但是一直提示 Server sent unexpected return value (403 Forbidden) in response to CHECKOUT ...

  10. jQuery的学习笔记4

    JQuery学习笔记3 2.9属性选择器 属性选择器就是根据元素的属性和属性值作为过滤条件,来匹配对应的DOM元素.属性选择器一般都以中括号作为起止分界符 它的形式如下: [attribute] [a ...