Joe*_*moe 10 windows-registry windows-7 context-menu right-click
创建用户定义的右键单击菜单项时,Windows 注册表中经常使用空的“NoWorkingDirectory”字符串值。例如,在 Windows 资源管理器中右键单击文件夹背景时能够打开 PowerShell(而不是右键单击文件夹本身,在这种情况下不使用“NoWorkingDirectory”):
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell]
@="Open PowerShell Here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command]
@="C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"
Run Code Online (Sandbox Code Playgroud)
但是,我不清楚这个值的实际用途。在我发现的所有样本中,它总是使用空的。它究竟意味着什么?
Knu*_*ger 11
WorkingDirectory 是 System.Diagnostics.ProcessStartInfo 的一个属性,当您右键单击时,您正在启动一个新进程,此设置允许您在当前目录不成为“工作目录”的情况下启动一个进程。然后它默认为正在运行的命令的 System32。
因此,当您不希望在脚本运行期间右键单击该位置成为环境路径的一部分时,您可以使用“NoWorkingDirectory”。在 90% 的情况下设置无用,除非您在多个路径位置有类似的命名文件,除非指定“NoWorkingDirectory”,否则这些文件可能会变得粘滞。
在此处查看更多详细信息。
| 归档时间: |
|
| 查看次数: |
3467 次 |
| 最近记录: |