简体   繁体   English

需要帮助通过批处理文件添加注册表项

[英]Need help adding registry key via batch file

I am trying to add the following registry key through cmd. 我正在尝试通过cmd添加以下注册表项。 I am not able to get other users to be able to add this registry key using regedit.exe /s "Location\\Project.reg" . 我无法让其他用户使用regedit.exe /s "Location\\Project.reg"添加此注册表项。

[HKEY_CURRENT_USER\\Software\\Autodesk\\Fabrication 2014\\Configuration\\1011-Shady-Grove] "Path"="C:/Autodesk/Profiles/05MA/1011-Shady-Grove" [HKEY_CURRENT_USER \\ Software \\ Autodesk \\ Fabrication 2014 \\ Configuration \\ 1011-Shady-Grove]“ Path” =“ C:/ Autodesk / Profiles / 05MA / 1011-Shady-Grove”

You are using the wrong tool. 您使用了错误的工具。 Regedit is a GUI tool. Regedit是一个GUI工具。 Yes you can use the /s switch, but fundamentally this is the wrong tool. 是的,您可以使用/ s开关,但是从根本上来说,这是错误的工具。 Plus it is built with the highestAvailable option in the UAC manifest. 另外,它是使用UAC清单中的highestAvailable选项构建的。

What you need is reg . 您需要的是reg Use it like this: 像这样使用它:

reg add "HKCU\Software\Autodesk\Fabrication 2014\Configuration\1011-Shady-Grove" /v Path /d C:/Autodesk/Profiles/05MA/1011-Shady-Grove

AFAIK, regedit will refuse to do anything if the user doesn't have administrative access, even if he has access to the registry keys. AFAIK,如果用户没有管理访问权,即使他有权访问注册表项,regedit也将拒绝执行任何操作。

Try the reg add command. 尝试reg add命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM