windows 10 右键添加在本文件夹打开cmd 或prowershell
在此处打开OpenPowershellHere右键
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellOpenPowershellHere] @="OpenPowershellHere" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTDirectoryshellOpenPowershellHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process powershell.exe"" [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenPowershellHere] @="OpenPowershellHere" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenPowershellHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process powershell.exe"" [HKEY_CLASSES_ROOTDriveshellOpenPowershellHere] @="OpenPowershellHere" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTDriveshellOpenPowershellHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process powershell.exe"" [HKEY_CLASSES_ROOTLibraryFolderackgroundshellOpenPowershellHere] @="OpenPowershellHere" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTLibraryFolderackgroundshellOpenPowershellHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process powershell.exe""
在此处打开命令窗口右键
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellOpenCmdHere] @="OpenCmdHere" "Icon"="cmd.exe" [HKEY_CLASSES_ROOTDirectoryshellOpenCmdHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd.exe"" [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHere] @="OpenCmdHere" "Icon"="cmd.exe" [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd.exe"" [HKEY_CLASSES_ROOTDriveshellOpenCmdHere] @="OpenCmdHere" "Icon"="cmd.exe" [HKEY_CLASSES_ROOTDriveshellOpenCmdHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd.exe"" [HKEY_CLASSES_ROOTLibraryFolderackgroundshellOpenCmdHere] @="OpenCmdHere" "Icon"="cmd.exe" [HKEY_CLASSES_ROOTLibraryFolderackgroundshellOpenCmdHerecommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd.exe""
以上代码.保存为注册表文件 .reg 双击运行就可以了...