好友
阅读权限30
听众
最后登录1970-1-1
|
40吾爱币
目前使用的Windows 10 21H2系统,然后想要把在此处打开命令行和在此处打开Powershell同时显示出来,就导出和修改出了个reg脚本文件,但是执行时提示没有足够的权限写入!
使用搜索引擎搜到了下面两篇文章
https://www.sohu.com/a/478148799_114760
https://blog.eleusis.se/2020/02/17/becoming-nt-servicetrustedinstaller/
发现创建子进程的用户为SYSTEM,而非TrustedInstaller,并且通过regedit命令执行reg文件时仍然提示没有权限。
请问下如何让这个reg脚本文件执行成功?
注册表脚本如下:
[-HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell]
[-HKEY_CLASSES_ROOT\Directory\shell\cmd]
[-HKEY_CLASSES_ROOT\Directory\shell\Powershell]
[-HKEY_CLASSES_ROOT\Drive\shell\cmd]
[-HKEY_CLASSES_ROOT\Drive\shell\Powershell]
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"ShowBaseOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"ShowBaseOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"HideBasedOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Drive\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
|
最佳答案
查看完整内容
把文件改为压缩rar,再解压。把1.reg改为你的注册表
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|