右键添加当前路径cmd,powershell管理员启动

文件夹内鼠标右键添加cmd管理员启动
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open CMD window here as Admin"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

文件夹内鼠标右键添加powershell管理员启动
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\sail_powershell]
@="Open PowerShell window here as Admin"
"icon"="powershell.exe"
"ShowBasedOnVelocityId"=dword:00639bc8

[HKEY_CLASSES_ROOT\Directory\Background\shell\sail_powershell\command]
@="powershell.exe -windowstyle hidden -Command $stpath = pwd; Start-Process PowerShell -ArgumentList \\\"-NoExit\\\", \\\"-Command Set-Location -literalPath '%V'\\\" -verb RunAs"
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容