We can right-click the mouse with Shift key to find the "Open command here" or "Open PowerShell window here" item to open the command line at current location.
But we often need to run the command line as an administrator, so you could register the following value to Windows Register to add a new item "Open command (as Admin) here" to Windows Explorer right-click menu.
Open the Notepad and paste the text of above, save the file as OpenCMDHere.reg, and then double click this file, and click the "Yes" button in the message box.
The meaning of the above code is that we will create a new Windows shell item called "runas" at folder and the empty space in a folder, and set the Icon and propmt text.
HKEY_CLASSES_ROOT\Directory\shell, the context menu when you right-click on a folder
HKEY_CLASSES_ROOT\Directory\background, the context menu when you right-click on the "background" empty space while in a folder
Then to define the running command of "runas" item:
cmd.exe /s /k pushd \"%V\"
That means to run the cmd.exe at the current working folder, the /k carries out the command specified by the following string so it executes the command pushd %V and since the only argument pushd accepts is a path it follows that %V a variable delivered by explorer that contains the path of the folder right clicked.
前几个月把单位和家里的电脑都升级到了 Windows 10 ,升级很顺利,使用起来也非常流畅。这里有几个小提示大家可以参考下:
(个人十分建议执行全新安装,通过近2个月的使用,升级版的 Windows 10 还是会出现一些奇葩问题的,比如过了一段时间 Windows Explorer 和 Microsoft Edge 经常性的自动重启,Skype、百度输入法莫名卡死等问题,但是全新安装的版本,并没有出现过这一类的问题)
1 如果是从 Windows 7/8 升级至 Windows 10 ,希望删除系统盘中旧版本 Windows 的文件(Windows.old),可以执行如下操作:
(1) 打开“这台计算机(This PC)”, 在C:盘上点击右键,选择属性
(2) 在常规页下,点击“磁盘清理(Disk Cleanup)”,稍等片刻后,点击新页面中的”清理系统文件(Clean up system files)”按钮
(3) 勾选中“以前版本的Windows安装(Previous Windows installation(s))”,点击确认,即可。