renini只能设置权限
secedit /configure /db test.sdb /cfg test.inf /log test.log也不行
SetACL 也不行- //1------secedit-----------
- @echo off
- rem 设置"HKEY_LOCAL_MACHINE\SOFTWARE\test"的所有者为:Everyone
- >>test.inf echo.[Version]
- >>test.inf echo.Signature = "$Chicago$"
- >>test.inf echo.
- >>test.inf echo.[Registry Keys]
- >>test.inf echo."MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree", 0, "O:WD"
- secedit /configure /db test.sdb /cfg test.inf /log test.log
- del test.*
- pause
-
-
- //2------SetACL-----------
- whoami /user >%temp%\test.txt
- for /f "delims=" %%i in (%temp%\test.txt) do set last=%%i
- for /f "delims=S tokens=2" %%i in ('echo %last%') do set SID=S%%i
- SetACL.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree" -ot reg -actn setowner -ownr "n:%SID%;s:y"
- SetACL.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree" -ot reg -actn ace -ace "n:administrators;p:full"
复制代码 其他办法不知道了, 也没能搜到
具体就是把这个操作用bat实现 "注册表-右键单击某个key-权限-高级-所有者"
然后我也搜索了, 然后折腾了一下午,没能搞定 |