简体   繁体   中英

Need help adding registry key via batch file

I am trying to add the following registry key through cmd. I am not able to get other users to be able to add this registry key using 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"

You are using the wrong tool. Regedit is a GUI tool. Yes you can use the /s switch, but fundamentally this is the wrong tool. Plus it is built with the highestAvailable option in the UAC manifest.

What you need is 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.

Try the reg add command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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